@aws-amplify/graphql-transformer-interfaces 3.3.0-rds-5.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/API.md +146 -24
- package/CHANGELOG.md +16 -1
- package/lib/graphql-api-provider.d.ts +1 -14
- package/lib/graphql-api-provider.d.ts.map +1 -1
- package/lib/graphql-api-provider.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/model-datasource/index.d.ts +2 -0
- package/lib/model-datasource/index.d.ts.map +1 -0
- package/lib/model-datasource/index.js +18 -0
- package/lib/model-datasource/index.js.map +1 -0
- package/lib/model-datasource/types.d.ts +55 -0
- package/lib/model-datasource/types.d.ts.map +1 -0
- package/lib/model-datasource/types.js +3 -0
- package/lib/model-datasource/types.js.map +1 -0
- package/lib/transform-host-provider.d.ts +2 -1
- package/lib/transform-host-provider.d.ts.map +1 -1
- package/lib/transformer-context/index.d.ts +2 -2
- package/lib/transformer-context/index.d.ts.map +1 -1
- package/lib/transformer-context/index.js +3 -1
- package/lib/transformer-context/index.js.map +1 -1
- package/lib/transformer-context/transform-parameters.d.ts +2 -0
- package/lib/transformer-context/transform-parameters.d.ts.map +1 -1
- package/lib/transformer-context/transformer-context-provider.d.ts +9 -6
- package/lib/transformer-context/transformer-context-provider.d.ts.map +1 -1
- package/lib/transformer-context/transformer-datasource-provider.d.ts +15 -5
- package/lib/transformer-context/transformer-datasource-provider.d.ts.map +1 -1
- package/lib/transformer-context/transformer-datasource-provider.js +10 -1
- package/lib/transformer-context/transformer-datasource-provider.js.map +1 -1
- package/package.json +2 -2
- package/src/graphql-api-provider.ts +15 -29
- package/src/index.ts +2 -3
- package/src/model-datasource/index.ts +1 -0
- package/src/model-datasource/types.ts +163 -0
- package/src/transform-host-provider.ts +1 -1
- package/src/transformer-context/index.ts +9 -4
- package/src/transformer-context/transform-parameters.ts +2 -0
- package/src/transformer-context/transformer-context-provider.ts +9 -3
- package/src/transformer-context/transformer-datasource-provider.ts +37 -8
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DocumentNode } from 'graphql';
|
|
2
|
-
import { AppSyncAuthConfiguration, GraphQLAPIProvider
|
|
3
|
-
import {
|
|
2
|
+
import { AppSyncAuthConfiguration, GraphQLAPIProvider } from '../graphql-api-provider';
|
|
3
|
+
import { CustomSqlDataSourceStrategy, ProvisionedConcurrencyConfig, RDSLayerMapping, VpcConfig } from '../model-datasource';
|
|
4
|
+
import { TransformerDataSourceManagerProvider, DataSourceType } from './transformer-datasource-provider';
|
|
4
5
|
import { TransformerProviderRegistry } from './transformer-provider-registry';
|
|
5
6
|
import { TransformerContextOutputProvider } from './transformer-context-output-provider';
|
|
6
7
|
import { StackManagerProvider } from './stack-manager-provider';
|
|
@@ -22,7 +23,8 @@ export interface TransformerContextProvider {
|
|
|
22
23
|
dataSources: TransformerDataSourceManagerProvider;
|
|
23
24
|
providerRegistry: TransformerProviderRegistry;
|
|
24
25
|
inputDocument: DocumentNode;
|
|
25
|
-
modelToDatasourceMap: Map<string,
|
|
26
|
+
modelToDatasourceMap: Map<string, DataSourceType>;
|
|
27
|
+
customSqlDataSourceStrategies?: CustomSqlDataSourceStrategy[];
|
|
26
28
|
datasourceSecretParameterLocations: Map<string, TransformerSecrets>;
|
|
27
29
|
output: TransformerContextOutputProvider;
|
|
28
30
|
stackManager: StackManagerProvider;
|
|
@@ -36,10 +38,11 @@ export interface TransformerContextProvider {
|
|
|
36
38
|
getResolverConfig<ResolverConfig>(): ResolverConfig | undefined;
|
|
37
39
|
readonly sqlLambdaVpcConfig?: VpcConfig;
|
|
38
40
|
readonly rdsLayerMapping?: RDSLayerMapping;
|
|
41
|
+
readonly sqlLambdaProvisionedConcurrencyConfig?: ProvisionedConcurrencyConfig;
|
|
39
42
|
}
|
|
40
|
-
export type TransformerBeforeStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | 'modelToDatasourceMap' | 'transformParameters' | 'isProjectUsingDataStore' | 'getResolverConfig' | 'authConfig' | 'stackManager' | 'synthParameters'>;
|
|
41
|
-
export type TransformerSchemaVisitStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | 'modelToDatasourceMap' | 'output' | 'providerRegistry' | 'transformParameters' | 'isProjectUsingDataStore' | 'getResolverConfig' | 'metadata' | 'authConfig' | 'resourceHelper'>;
|
|
42
|
-
export type TransformerValidationStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | 'modelToDatasourceMap' | 'output' | 'providerRegistry' | 'dataSources' | 'transformParameters' | 'isProjectUsingDataStore' | 'getResolverConfig' | 'metadata' | 'authConfig' | 'resourceHelper' | 'resolvers' | 'stackManager' | 'synthParameters'>;
|
|
43
|
+
export type TransformerBeforeStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | 'modelToDatasourceMap' | 'customSqlDataSourceStrategies' | 'transformParameters' | 'isProjectUsingDataStore' | 'getResolverConfig' | 'authConfig' | 'stackManager' | 'synthParameters'>;
|
|
44
|
+
export type TransformerSchemaVisitStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | 'modelToDatasourceMap' | 'customSqlDataSourceStrategies' | 'output' | 'providerRegistry' | 'transformParameters' | 'isProjectUsingDataStore' | 'getResolverConfig' | 'metadata' | 'authConfig' | 'resourceHelper'>;
|
|
45
|
+
export type TransformerValidationStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | 'modelToDatasourceMap' | 'customSqlDataSourceStrategies' | 'output' | 'providerRegistry' | 'dataSources' | 'transformParameters' | 'isProjectUsingDataStore' | 'getResolverConfig' | 'metadata' | 'authConfig' | 'resourceHelper' | 'resolvers' | 'stackManager' | 'synthParameters'>;
|
|
43
46
|
export type TransformerPrepareStepContextProvider = TransformerValidationStepContextProvider;
|
|
44
47
|
export type TransformerTransformSchemaStepContextProvider = TransformerValidationStepContextProvider;
|
|
45
48
|
//# sourceMappingURL=transformer-context-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformer-context-provider.d.ts","sourceRoot":"","sources":["../../src/transformer-context/transformer-context-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"transformer-context-provider.d.ts","sourceRoot":"","sources":["../../src/transformer-context/transformer-context-provider.ts"],"names":[],"mappings":"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"}
|
|
@@ -16,15 +16,25 @@ export interface NoneDataSourceProvider {
|
|
|
16
16
|
}
|
|
17
17
|
export type DataSourceInstance = ITable | CfnDomain | HttpDataSource | IFunction | NoneDataSourceProvider;
|
|
18
18
|
export interface TransformerDataSourceManagerProvider {
|
|
19
|
-
add(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, dataSourceInstance: DataSourceInstance)
|
|
20
|
-
get(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode)
|
|
21
|
-
has(name: string)
|
|
19
|
+
add: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, dataSourceInstance: DataSourceInstance) => void;
|
|
20
|
+
get: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode) => DataSourceInstance;
|
|
21
|
+
has: (name: string) => boolean;
|
|
22
22
|
}
|
|
23
23
|
export interface DataSourceProvider extends BackedDataSource {
|
|
24
24
|
}
|
|
25
|
-
export type DBType = 'DDB' |
|
|
26
|
-
export
|
|
25
|
+
export type DBType = 'DDB' | SQLDBType;
|
|
26
|
+
export type SQLDBType = 'MySQL' | 'Postgres';
|
|
27
|
+
export type DataSourceProvisionStrategy = DynamoDBProvisionStrategy | SQLLambdaModelProvisionStrategy;
|
|
28
|
+
export declare const enum DynamoDBProvisionStrategy {
|
|
29
|
+
DEFAULT = "DEFAULT",
|
|
30
|
+
AMPLIFY_TABLE = "AMPLIFY_TABLE"
|
|
31
|
+
}
|
|
32
|
+
export declare const enum SQLLambdaModelProvisionStrategy {
|
|
33
|
+
DEFAULT = "DEFAULT"
|
|
34
|
+
}
|
|
35
|
+
export interface DataSourceType {
|
|
27
36
|
dbType: DBType;
|
|
28
37
|
provisionDB: boolean;
|
|
38
|
+
provisionStrategy: DataSourceProvisionStrategy;
|
|
29
39
|
}
|
|
30
40
|
//# sourceMappingURL=transformer-datasource-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformer-datasource-provider.d.ts","sourceRoot":"","sources":["../../src/transformer-context/transformer-datasource-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEhF,oBAAY,qBAAqB;IAC/B,eAAe,oBAAoB;IACnC,oBAAoB,yBAAyB;IAC7C,UAAU,eAAe;IACzB,mBAAmB,wBAAwB;IAC3C,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,GAAG,sBAAsB,CAAC;AAE1G,MAAM,WAAW,oCAAoC;IACnD,GAAG,CAAC,IAAI,EAAE,wBAAwB,GAAG,2BAA2B,EAAE,kBAAkB,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"transformer-datasource-provider.d.ts","sourceRoot":"","sources":["../../src/transformer-context/transformer-datasource-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEhF,oBAAY,qBAAqB;IAC/B,eAAe,oBAAoB;IACnC,oBAAoB,yBAAyB;IAC7C,UAAU,eAAe;IACzB,mBAAmB,wBAAwB;IAC3C,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,GAAG,sBAAsB,CAAC;AAE1G,MAAM,WAAW,oCAAoC;IACnD,GAAG,EAAE,CAAC,IAAI,EAAE,wBAAwB,GAAG,2BAA2B,EAAE,kBAAkB,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACpH,GAAG,EAAE,CAAC,IAAI,EAAE,wBAAwB,GAAG,2BAA2B,KAAK,kBAAkB,CAAC;IAC1F,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;CAAG;AAK/D,MAAM,MAAM,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC;AAKvC,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;AAG7C,MAAM,MAAM,2BAA2B,GAAG,yBAAyB,GAAG,+BAA+B,CAAC;AAMtG,0BAAkB,yBAAyB;IAIzC,OAAO,YAAY;IAInB,aAAa,kBAAkB;CAChC;AAGD,0BAAkB,+BAA+B;IAI/C,OAAO,YAAY;CACpB;AAGD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,2BAA2B,CAAC;CAChD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppSyncDataSourceType = void 0;
|
|
3
|
+
exports.SQLLambdaModelProvisionStrategy = exports.DynamoDBProvisionStrategy = exports.AppSyncDataSourceType = void 0;
|
|
4
4
|
var AppSyncDataSourceType;
|
|
5
5
|
(function (AppSyncDataSourceType) {
|
|
6
6
|
AppSyncDataSourceType["AMAZON_DYNAMODB"] = "AMAZON_DYNAMODB";
|
|
@@ -10,4 +10,13 @@ var AppSyncDataSourceType;
|
|
|
10
10
|
AppSyncDataSourceType["HTTP"] = "HTTP";
|
|
11
11
|
AppSyncDataSourceType["NONE"] = "NONE";
|
|
12
12
|
})(AppSyncDataSourceType = exports.AppSyncDataSourceType || (exports.AppSyncDataSourceType = {}));
|
|
13
|
+
var DynamoDBProvisionStrategy;
|
|
14
|
+
(function (DynamoDBProvisionStrategy) {
|
|
15
|
+
DynamoDBProvisionStrategy["DEFAULT"] = "DEFAULT";
|
|
16
|
+
DynamoDBProvisionStrategy["AMPLIFY_TABLE"] = "AMPLIFY_TABLE";
|
|
17
|
+
})(DynamoDBProvisionStrategy = exports.DynamoDBProvisionStrategy || (exports.DynamoDBProvisionStrategy = {}));
|
|
18
|
+
var SQLLambdaModelProvisionStrategy;
|
|
19
|
+
(function (SQLLambdaModelProvisionStrategy) {
|
|
20
|
+
SQLLambdaModelProvisionStrategy["DEFAULT"] = "DEFAULT";
|
|
21
|
+
})(SQLLambdaModelProvisionStrategy = exports.SQLLambdaModelProvisionStrategy || (exports.SQLLambdaModelProvisionStrategy = {}));
|
|
13
22
|
//# sourceMappingURL=transformer-datasource-provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformer-datasource-provider.js","sourceRoot":"","sources":["../../src/transformer-context/transformer-datasource-provider.ts"],"names":[],"mappings":";;;AAMA,IAAY,qBAOX;AAPD,WAAY,qBAAqB;IAC/B,4DAAmC,CAAA;IACnC,sEAA6C,CAAA;IAC7C,kDAAyB,CAAA;IACzB,oEAA2C,CAAA;IAC3C,sCAAa,CAAA;IACb,sCAAa,CAAA;AACf,CAAC,EAPW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAOhC"}
|
|
1
|
+
{"version":3,"file":"transformer-datasource-provider.js","sourceRoot":"","sources":["../../src/transformer-context/transformer-datasource-provider.ts"],"names":[],"mappings":";;;AAMA,IAAY,qBAOX;AAPD,WAAY,qBAAqB;IAC/B,4DAAmC,CAAA;IACnC,sEAA6C,CAAA;IAC7C,kDAAyB,CAAA;IACzB,oEAA2C,CAAA;IAC3C,sCAAa,CAAA;IACb,sCAAa,CAAA;AACf,CAAC,EAPW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAOhC;AAiCD,IAAkB,yBASjB;AATD,WAAkB,yBAAyB;IAIzC,gDAAmB,CAAA;IAInB,4DAA+B,CAAA;AACjC,CAAC,EATiB,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAS1C;AAGD,IAAkB,+BAKjB;AALD,WAAkB,+BAA+B;IAI/C,sDAAmB,CAAA;AACrB,CAAC,EALiB,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAKhD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/graphql-transformer-interfaces",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "Amplify GraphQL transformer interface definitions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
],
|
|
50
50
|
"collectCoverage": true
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "5256b5955ee204dd56f8074a43406852f8206c54"
|
|
53
53
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CfnResource, IAsset } from 'aws-cdk-lib';
|
|
2
2
|
import { Construct, IConstruct } from 'constructs';
|
|
3
3
|
import { Grant, IGrantable, IRole } from 'aws-cdk-lib/aws-iam';
|
|
4
|
+
// eslint-disable-next-line import/no-cycle
|
|
4
5
|
import { TransformHostProvider } from './transform-host-provider';
|
|
5
6
|
|
|
6
7
|
// Auth Config Modes
|
|
@@ -56,43 +57,28 @@ export interface OpenIDConnectConfig {
|
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
export interface LambdaConfig {
|
|
60
|
+
/**
|
|
61
|
+
* Function name, excluding optional `-{env}` suffix.
|
|
62
|
+
*/
|
|
59
63
|
lambdaFunction: string;
|
|
60
|
-
ttlSeconds?: number;
|
|
61
|
-
}
|
|
62
64
|
|
|
63
|
-
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
export type VpcConfig = {
|
|
69
|
-
vpcId: string;
|
|
70
|
-
subnetAvailabilityZoneConfig: SubnetAvailabilityZone[];
|
|
71
|
-
securityGroupIds: string[];
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Although it is possible to create multiple subnets in a single availability zone, VPC Endpoints may only be deployed to a single subnet
|
|
76
|
-
* in a given availability zone. We use this structure to ensure that the Lambda function and VPC endpoints are mutually consistent.
|
|
77
|
-
*/
|
|
78
|
-
export type SubnetAvailabilityZone = {
|
|
79
|
-
SubnetId: string;
|
|
80
|
-
AvailabilityZone: string;
|
|
81
|
-
};
|
|
65
|
+
/**
|
|
66
|
+
* The ARN of an existing Lambda function. If provided, this will circumvent the ARN construction when building the API auth mode config.
|
|
67
|
+
* The ARN must refer to the same function named in `lambdaFunction`.
|
|
68
|
+
*/
|
|
69
|
+
lambdaArn?: string;
|
|
82
70
|
|
|
83
|
-
/**
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
layerRegion: string;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
71
|
+
/**
|
|
72
|
+
* Optional auth response time to live.
|
|
73
|
+
*/
|
|
74
|
+
ttlSeconds?: number;
|
|
75
|
+
}
|
|
91
76
|
|
|
92
77
|
export interface AppSyncFunctionConfigurationProvider extends IConstruct {
|
|
93
78
|
readonly arn: string;
|
|
94
79
|
readonly functionId: string;
|
|
95
80
|
}
|
|
81
|
+
|
|
96
82
|
export interface DataSourceOptions {
|
|
97
83
|
/**
|
|
98
84
|
* The name of the data source, overrides the id given by cdk
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-cycle
|
|
1
2
|
export * from './transformer-context';
|
|
2
3
|
export { TransformerPluginProvider, TransformerPluginType } from './transformer-plugin-provider';
|
|
3
4
|
export {
|
|
@@ -27,13 +28,11 @@ export {
|
|
|
27
28
|
AppSyncAuthConfigurationUserPoolEntry,
|
|
28
29
|
AppSyncAuthMode,
|
|
29
30
|
UserPoolConfig,
|
|
30
|
-
VpcConfig,
|
|
31
|
-
SubnetAvailabilityZone,
|
|
32
31
|
SearchableDataSourceOptions,
|
|
33
|
-
RDSLayerMapping,
|
|
34
32
|
} from './graphql-api-provider';
|
|
35
33
|
export { TransformHostProvider, DynamoDbDataSourceOptions } from './transform-host-provider';
|
|
36
34
|
export { TransformerLog, TransformerLogLevel } from './transformer-log';
|
|
37
35
|
export type { TransformParameters } from './transformer-context/transform-parameters';
|
|
38
36
|
export type { NestedStackProvider } from './nested-stack-provider';
|
|
39
37
|
export type { AssetProps, AssetProvider, S3Asset } from './asset-provider';
|
|
38
|
+
export * from './model-datasource';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types';
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { DataSourceType } from '../transformer-context/transformer-datasource-provider';
|
|
2
|
+
|
|
3
|
+
// #########################################################################################################################################
|
|
4
|
+
// If you change types in this file (the internal implementation), be sure to make corresponding necessary changes to
|
|
5
|
+
// amplify-graphql-api-construct/src/model-datasource-strategy.ts (the customer-facing interface) and the adapter functions in this file.
|
|
6
|
+
// #########################################################################################################################################
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* All known ModelDataSourceStrategies. Concrete strategies vary widely in their requirements and implementations.
|
|
10
|
+
*/
|
|
11
|
+
export type ModelDataSourceStrategy =
|
|
12
|
+
| DefaultDynamoDbModelDataSourceStrategy
|
|
13
|
+
| AmplifyDynamoDbModelDataSourceStrategy
|
|
14
|
+
| SQLLambdaModelDataSourceStrategy;
|
|
15
|
+
|
|
16
|
+
export interface ModelDataSourceStrategyBase {
|
|
17
|
+
dbType: ModelDataSourceStrategyDbType;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// TODO: Make this the source of truth for database type definitions used throughout the construct & transformer
|
|
21
|
+
export type ModelDataSourceStrategyDbType = 'DYNAMODB' | 'MYSQL' | 'POSTGRES';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Use default CloudFormation type 'AWS::DynamoDB::Table' to provision table.
|
|
25
|
+
*/
|
|
26
|
+
export interface DefaultDynamoDbModelDataSourceStrategy extends ModelDataSourceStrategyBase {
|
|
27
|
+
readonly dbType: 'DYNAMODB';
|
|
28
|
+
readonly provisionStrategy: 'DEFAULT';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Use custom resource type 'Custom::AmplifyDynamoDBTable' to provision table.
|
|
33
|
+
*/
|
|
34
|
+
export interface AmplifyDynamoDbModelDataSourceStrategy extends ModelDataSourceStrategyBase {
|
|
35
|
+
readonly dbType: 'DYNAMODB';
|
|
36
|
+
readonly provisionStrategy: 'AMPLIFY_TABLE';
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* A strategy that creates a Lambda to connect to a pre-existing SQL table to resolve model data.
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
export interface SQLLambdaModelDataSourceStrategy extends ModelDataSourceStrategyBase {
|
|
44
|
+
/**
|
|
45
|
+
* The name of the strategy. This will be used to name the AppSync DataSource itself, plus any associated resources like resolver Lambdas.
|
|
46
|
+
* This name must be unique across all schema definitions in a GraphQL API.
|
|
47
|
+
*/
|
|
48
|
+
readonly name: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The type of the SQL database used to process model operations for this definition.
|
|
52
|
+
*/
|
|
53
|
+
readonly dbType: 'MYSQL' | 'POSTGRES';
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The parameters the Lambda data source will use to connect to the database.
|
|
57
|
+
*/
|
|
58
|
+
readonly dbConnectionConfig: SqlModelDataSourceDbConnectionConfig;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The configuration of the VPC into which to install the Lambda.
|
|
62
|
+
*/
|
|
63
|
+
readonly vpcConfiguration?: VpcConfig;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Custom SQL statements. The key is the value of the `references` attribute of the `@sql` directive in the `schema`; the value is the SQL
|
|
67
|
+
* to be executed.
|
|
68
|
+
*/
|
|
69
|
+
readonly customSqlStatements?: Record<string, string>;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The configuration for the provisioned concurrency of the Lambda.
|
|
73
|
+
*/
|
|
74
|
+
readonly sqlLambdaProvisionedConcurrencyConfig?: ProvisionedConcurrencyConfig;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Configuration of the VPC in which to install a Lambda to resolve queries against a SQL-based data source. The SQL Lambda will be deployed
|
|
79
|
+
* into the specified VPC, subnets, and security groups. The specified subnets and security groups must be in the same VPC. The VPC must
|
|
80
|
+
* have at least one subnet. The construct will also create VPC service endpoints in the specified subnets, as well as inbound security
|
|
81
|
+
* rules, to allow traffic on port 443 within each security group. This allows the Lambda to read database connection information from
|
|
82
|
+
* Secure Systems Manager.
|
|
83
|
+
*/
|
|
84
|
+
export interface VpcConfig {
|
|
85
|
+
/** The VPC to install the Lambda data source in. */
|
|
86
|
+
readonly vpcId: string;
|
|
87
|
+
|
|
88
|
+
/** The security groups to install the Lambda data source in. */
|
|
89
|
+
readonly securityGroupIds: string[];
|
|
90
|
+
|
|
91
|
+
/** The subnets to install the Lambda data source in, one per availability zone. */
|
|
92
|
+
readonly subnetAvailabilityZoneConfig: SubnetAvailabilityZone[];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The configuration for the provisioned concurrency of the Lambda.
|
|
97
|
+
*/
|
|
98
|
+
export interface ProvisionedConcurrencyConfig {
|
|
99
|
+
/** The amount of provisioned concurrency to allocate. **/
|
|
100
|
+
readonly provisionedConcurrentExecutions: number;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Subnet configuration for VPC endpoints used by a Lambda resolver for a SQL-based data source. Although it is possible to create multiple
|
|
105
|
+
* subnets in a single availability zone, VPC service endpoints may only be deployed to a single subnet in a given availability zone. This
|
|
106
|
+
* structure ensures that the Lambda function and VPC service endpoints are mutually consistent.
|
|
107
|
+
*/
|
|
108
|
+
export interface SubnetAvailabilityZone {
|
|
109
|
+
/** The subnet ID to install the Lambda data source in. */
|
|
110
|
+
readonly subnetId: string;
|
|
111
|
+
|
|
112
|
+
/** The availability zone of the subnet. */
|
|
113
|
+
readonly availabilityZone: string;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The Secure Systems Manager parameter paths the Lambda data source will use to connect to the database.
|
|
118
|
+
*
|
|
119
|
+
* These parameters are retrieved from Secure Systems Manager in the same region as the Lambda.
|
|
120
|
+
*/
|
|
121
|
+
export interface SqlModelDataSourceDbConnectionConfig {
|
|
122
|
+
/** The Secure Systems Manager parameter containing the hostname of the database. For RDS-based SQL data sources, this can be the hostname
|
|
123
|
+
* of a database proxy, cluster, or instance.
|
|
124
|
+
*/
|
|
125
|
+
readonly hostnameSsmPath: string;
|
|
126
|
+
|
|
127
|
+
/** The Secure Systems Manager parameter containing the port number of the database proxy, cluster, or instance. */
|
|
128
|
+
readonly portSsmPath: string;
|
|
129
|
+
|
|
130
|
+
/** The Secure Systems Manager parameter containing the username to use when connecting to the database. */
|
|
131
|
+
readonly usernameSsmPath: string;
|
|
132
|
+
|
|
133
|
+
/** The Secure Systems Manager parameter containing the password to use when connecting to the database. */
|
|
134
|
+
readonly passwordSsmPath: string;
|
|
135
|
+
|
|
136
|
+
/** The Secure Systems Manager parameter containing the database name. */
|
|
137
|
+
readonly databaseNameSsmPath: string;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface CustomSqlDataSourceStrategy {
|
|
141
|
+
readonly typeName: 'Query' | 'Mutation';
|
|
142
|
+
readonly fieldName: string;
|
|
143
|
+
// TODO: Replace this when we support heterogeneous SQL data sources in a single API
|
|
144
|
+
readonly dataSourceType: DataSourceType;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface DataSourceStrategiesProvider {
|
|
148
|
+
/** Maps GraphQL model names to the ModelDataSourceStrategy used to resolve it. The key of the record is the GraphQL type name. */
|
|
149
|
+
// TODO: Add this back during combine feature
|
|
150
|
+
// dataSourceStrategies: Record<string, ModelDataSourceStrategy>;
|
|
151
|
+
|
|
152
|
+
/** Maps custom Query and Mutation fields to the ModelDataSourceStrategy used to resolve them. */
|
|
153
|
+
customSqlDataSourceStrategies: CustomSqlDataSourceStrategy[];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Maps a given AWS region to the SQL Lambda layer version ARN for that region. TODO: Rename to SQLLambdaLayerMapping
|
|
158
|
+
*/
|
|
159
|
+
export interface RDSLayerMapping {
|
|
160
|
+
readonly [key: string]: {
|
|
161
|
+
layerRegion: string;
|
|
162
|
+
};
|
|
163
|
+
}
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
DataSourceOptions,
|
|
18
18
|
SearchableDataSourceOptions,
|
|
19
19
|
MappingTemplateProvider,
|
|
20
|
-
VpcConfig,
|
|
21
20
|
} from './graphql-api-provider';
|
|
21
|
+
import { VpcConfig } from './model-datasource';
|
|
22
22
|
|
|
23
23
|
export interface DynamoDbDataSourceOptions extends DataSourceOptions {
|
|
24
24
|
/**
|
|
@@ -3,21 +3,26 @@ export {
|
|
|
3
3
|
TransformerDataSourceManagerProvider,
|
|
4
4
|
AppSyncDataSourceType,
|
|
5
5
|
DataSourceInstance,
|
|
6
|
+
DataSourceType,
|
|
6
7
|
DBType,
|
|
7
|
-
|
|
8
|
+
DataSourceProvisionStrategy,
|
|
9
|
+
DynamoDBProvisionStrategy,
|
|
10
|
+
SQLLambdaModelProvisionStrategy,
|
|
11
|
+
SQLDBType,
|
|
8
12
|
} from './transformer-datasource-provider';
|
|
9
13
|
export { TransformerContextOutputProvider } from './transformer-context-output-provider';
|
|
10
14
|
export { TransformerProviderRegistry } from './transformer-provider-registry';
|
|
11
15
|
export { TransformerResolverProvider, TransformerResolversManagerProvider } from './transformer-resolver-provider';
|
|
12
16
|
export * from './resource-resource-provider';
|
|
13
17
|
export {
|
|
14
|
-
TransformerContextProvider,
|
|
15
|
-
TransformerTransformSchemaStepContextProvider,
|
|
16
18
|
TransformerBeforeStepContextProvider,
|
|
19
|
+
TransformerContextMetadataProvider,
|
|
20
|
+
TransformerContextProvider,
|
|
17
21
|
TransformerPrepareStepContextProvider,
|
|
18
22
|
TransformerSchemaVisitStepContextProvider,
|
|
19
|
-
TransformerValidationStepContextProvider,
|
|
20
23
|
TransformerSecrets,
|
|
24
|
+
TransformerTransformSchemaStepContextProvider,
|
|
25
|
+
TransformerValidationStepContextProvider,
|
|
21
26
|
} from './transformer-context-provider';
|
|
22
27
|
export { TransformerSchemaHelperProvider } from './schema-helper-provider';
|
|
23
28
|
export { TransformerPreProcessContextProvider } from './transformer-preprocess-context-provider';
|
|
@@ -12,6 +12,8 @@ export type TransformParameters = {
|
|
|
12
12
|
shouldDeepMergeDirectiveConfigDefaults: boolean;
|
|
13
13
|
disableResolverDeduping: boolean;
|
|
14
14
|
sandboxModeEnabled: boolean;
|
|
15
|
+
allowDestructiveGraphqlSchemaUpdates: boolean;
|
|
16
|
+
replaceTableUponGsiUpdate: boolean;
|
|
15
17
|
|
|
16
18
|
// Auth Params
|
|
17
19
|
useSubUsernameForDefaultIdentityClaim: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DocumentNode } from 'graphql';
|
|
2
|
-
import { AppSyncAuthConfiguration, GraphQLAPIProvider
|
|
3
|
-
import {
|
|
2
|
+
import { AppSyncAuthConfiguration, GraphQLAPIProvider } from '../graphql-api-provider';
|
|
3
|
+
import { CustomSqlDataSourceStrategy, ProvisionedConcurrencyConfig, RDSLayerMapping, VpcConfig } from '../model-datasource';
|
|
4
|
+
import { TransformerDataSourceManagerProvider, DataSourceType } from './transformer-datasource-provider';
|
|
4
5
|
import { TransformerProviderRegistry } from './transformer-provider-registry';
|
|
5
6
|
import { TransformerContextOutputProvider } from './transformer-context-output-provider';
|
|
6
7
|
import { StackManagerProvider } from './stack-manager-provider';
|
|
@@ -24,7 +25,8 @@ export interface TransformerContextProvider {
|
|
|
24
25
|
providerRegistry: TransformerProviderRegistry;
|
|
25
26
|
|
|
26
27
|
inputDocument: DocumentNode;
|
|
27
|
-
modelToDatasourceMap: Map<string,
|
|
28
|
+
modelToDatasourceMap: Map<string, DataSourceType>;
|
|
29
|
+
customSqlDataSourceStrategies?: CustomSqlDataSourceStrategy[];
|
|
28
30
|
datasourceSecretParameterLocations: Map<string, TransformerSecrets>;
|
|
29
31
|
output: TransformerContextOutputProvider;
|
|
30
32
|
stackManager: StackManagerProvider;
|
|
@@ -39,12 +41,14 @@ export interface TransformerContextProvider {
|
|
|
39
41
|
getResolverConfig<ResolverConfig>(): ResolverConfig | undefined;
|
|
40
42
|
readonly sqlLambdaVpcConfig?: VpcConfig;
|
|
41
43
|
readonly rdsLayerMapping?: RDSLayerMapping;
|
|
44
|
+
readonly sqlLambdaProvisionedConcurrencyConfig?: ProvisionedConcurrencyConfig;
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
export type TransformerBeforeStepContextProvider = Pick<
|
|
45
48
|
TransformerContextProvider,
|
|
46
49
|
| 'inputDocument'
|
|
47
50
|
| 'modelToDatasourceMap'
|
|
51
|
+
| 'customSqlDataSourceStrategies'
|
|
48
52
|
| 'transformParameters'
|
|
49
53
|
| 'isProjectUsingDataStore'
|
|
50
54
|
| 'getResolverConfig'
|
|
@@ -57,6 +61,7 @@ export type TransformerSchemaVisitStepContextProvider = Pick<
|
|
|
57
61
|
TransformerContextProvider,
|
|
58
62
|
| 'inputDocument'
|
|
59
63
|
| 'modelToDatasourceMap'
|
|
64
|
+
| 'customSqlDataSourceStrategies'
|
|
60
65
|
| 'output'
|
|
61
66
|
| 'providerRegistry'
|
|
62
67
|
| 'transformParameters'
|
|
@@ -71,6 +76,7 @@ export type TransformerValidationStepContextProvider = Pick<
|
|
|
71
76
|
TransformerContextProvider,
|
|
72
77
|
| 'inputDocument'
|
|
73
78
|
| 'modelToDatasourceMap'
|
|
79
|
+
| 'customSqlDataSourceStrategies'
|
|
74
80
|
| 'output'
|
|
75
81
|
| 'providerRegistry'
|
|
76
82
|
| 'dataSources'
|
|
@@ -20,23 +20,52 @@ export interface NoneDataSourceProvider {
|
|
|
20
20
|
export type DataSourceInstance = ITable | CfnDomain | HttpDataSource | IFunction | NoneDataSourceProvider;
|
|
21
21
|
|
|
22
22
|
export interface TransformerDataSourceManagerProvider {
|
|
23
|
-
add(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, dataSourceInstance: DataSourceInstance)
|
|
24
|
-
get(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode)
|
|
25
|
-
has(name: string)
|
|
23
|
+
add: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, dataSourceInstance: DataSourceInstance) => void;
|
|
24
|
+
get: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode) => DataSourceInstance;
|
|
25
|
+
has: (name: string) => boolean;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export interface DataSourceProvider extends BackedDataSource {}
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* Supported transformable database types.
|
|
31
|
+
* Supported transformable database types. TODO: Remove this when we normalize database type handling throughout
|
|
32
32
|
*/
|
|
33
|
-
export type DBType = 'DDB' |
|
|
33
|
+
export type DBType = 'DDB' | SQLDBType;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
* storage or whether it already exists.
|
|
36
|
+
* Supported transformable SQL database types. TODO: Remove this when we normalize database type handling throughout
|
|
38
37
|
*/
|
|
39
|
-
export
|
|
38
|
+
export type SQLDBType = 'MySQL' | 'Postgres';
|
|
39
|
+
|
|
40
|
+
// TODO: add strategy for the RDS. TODO: Move this to amplify-graphql-api-construct
|
|
41
|
+
export type DataSourceProvisionStrategy = DynamoDBProvisionStrategy | SQLLambdaModelProvisionStrategy;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Provisioning configuration for a DynamoDB datasource. TODO: Remove this type in favor of strategy definitions in
|
|
45
|
+
* amplify-graphql-api-construct
|
|
46
|
+
*/
|
|
47
|
+
export const enum DynamoDBProvisionStrategy {
|
|
48
|
+
/**
|
|
49
|
+
* Use default CloudFormation resource of `AWS::DynamoDB::Table`
|
|
50
|
+
*/
|
|
51
|
+
DEFAULT = 'DEFAULT',
|
|
52
|
+
/**
|
|
53
|
+
* Use custom resource type `Custom::AmplifyDynamoDBTable`
|
|
54
|
+
*/
|
|
55
|
+
AMPLIFY_TABLE = 'AMPLIFY_TABLE',
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// TODO: Remove this type in favor of fully-specified SQLLambdaModelDataSourceStrategy from amplify-graphql-api-construct
|
|
59
|
+
export const enum SQLLambdaModelProvisionStrategy {
|
|
60
|
+
/**
|
|
61
|
+
* A strategy that creates a Lambda to connect to a pre-existing SQL table to resolve model data.
|
|
62
|
+
*/
|
|
63
|
+
DEFAULT = 'DEFAULT',
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// TODO: Replace usages of this type with ModelDataSourceStrategy
|
|
67
|
+
export interface DataSourceType {
|
|
40
68
|
dbType: DBType;
|
|
41
69
|
provisionDB: boolean;
|
|
70
|
+
provisionStrategy: DataSourceProvisionStrategy;
|
|
42
71
|
}
|