@aws-amplify/graphql-api-construct 1.4.3 → 1.5.1-alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- package/.jsii +202 -201
- package/API.md +7 -7
- package/CHANGELOG.md +12 -0
- package/README.md +210 -20
- package/lib/amplify-dynamodb-table-wrapper.js +1 -1
- package/lib/amplify-graphql-api.d.ts +0 -7
- package/lib/amplify-graphql-api.js +18 -76
- package/lib/amplify-graphql-definition.d.ts +1 -13
- package/lib/amplify-graphql-definition.js +27 -16
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/internal/data-source-config.d.ts +14 -20
- package/lib/internal/data-source-config.js +110 -38
- package/lib/internal/model-type-name.d.ts +2 -2
- package/lib/internal/model-type-name.js +4 -4
- package/lib/{model-datasource-strategy.d.ts → model-datasource-strategy-types.d.ts} +17 -11
- package/lib/model-datasource-strategy-types.js +10 -0
- package/lib/sql-model-datasource-strategy.d.ts +1 -1
- package/lib/sql-model-datasource-strategy.js +4 -4
- package/lib/types.d.ts +1 -9
- package/lib/types.js +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js +6 -10
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.js +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +16 -12
- package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-default-value-transformer/lib/graphql-default-value-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-default-value-transformer/lib/graphql-default-value-transformer.js +2 -7
- package/node_modules/@aws-amplify/graphql-default-value-transformer/lib/graphql-default-value-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +13 -9
- package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-function-transformer/lib/graphql-function-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-function-transformer/lib/graphql-function-transformer.js +7 -0
- package/node_modules/@aws-amplify/graphql-function-transformer/lib/graphql-function-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-function-transformer/package.json +11 -7
- package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +11 -7
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-primary-key-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-primary-key-transformer.js +4 -4
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-primary-key-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/resolvers.d.ts +3 -5
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/resolvers.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/resolvers.js +12 -34
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/resolvers.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/package.json +13 -9
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/assets/mapping-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-maps-to-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-maps-to-transformer.js +3 -4
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-maps-to-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-refers-to-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-refers-to-transformer.js +3 -3
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-refers-to-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/package.json +16 -12
- package/node_modules/@aws-amplify/graphql-model-transformer/API.md +2 -2
- package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +7 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.d.ts +1 -3
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js +61 -68
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-notification-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-patching-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.d.ts +8 -8
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.js +32 -36
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/rds-model-resource-generator.d.ts +3 -2
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/rds-model-resource-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/rds-model-resource-generator.js +70 -34
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/rds-model-resource-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/package.json +15 -10
- package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +11 -7
- package/node_modules/@aws-amplify/graphql-relational-transformer/API.md +2 -2
- package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js +14 -7
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.js +6 -6
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.js +6 -6
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.js +8 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.js +5 -3
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator-factory.d.ts +2 -2
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator-factory.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator-factory.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.js +18 -6
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.d.ts +18 -18
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js +54 -54
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +14 -10
- package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.js +1 -1
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/streaming-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/package.json +12 -8
- package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.js +31 -25
- package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +12 -8
- package/node_modules/@aws-amplify/graphql-transformer/API.md +3 -17
- package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.d.ts +4 -14
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js +8 -15
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer/package.json +20 -16
- package/node_modules/@aws-amplify/graphql-transformer/src/graphql-transformer.ts +30 -57
- package/node_modules/@aws-amplify/graphql-transformer-core/API.md +97 -30
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +7 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.d.ts +3 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js +22 -10
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/index.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/index.js +4 -2
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.d.ts +6 -12
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.js +4 -11
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/types.d.ts +0 -9
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/types.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/utils.d.ts +12 -10
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/utils.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/utils.js +94 -39
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/utils.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.d.ts +10 -22
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.js +3 -7
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/import-appsync-api-types.d.ts +1 -4
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/import-appsync-api-types.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/import-appsync-api-types.js +1 -4
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/import-appsync-api-types.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/index.d.ts +2 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/index.js +16 -4
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/model-datasource-strategies.d.ts +7 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/model-datasource-strategies.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/model-datasource-strategies.js +15 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/model-datasource-strategies.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/types.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/graphql-utils.d.ts +16 -2
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/graphql-utils.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/graphql-utils.js +21 -5
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/graphql-utils.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/index.d.ts +3 -4
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/index.js +5 -12
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts +11 -8
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js +64 -52
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/rds-util.d.ts +0 -10
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/rds-util.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/rds-util.js +1 -58
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/rds-util.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/resource-name.d.ts +22 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/resource-name.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/resource-name.js +28 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/resource-name.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/schema-utils.d.ts +2 -2
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/schema-utils.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/schema-utils.js +7 -6
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/schema-utils.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/package.json +9 -5
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +32 -68
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts +11 -7
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/index.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/index.js +1 -3
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transformer-context-provider.d.ts +11 -18
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transformer-context-provider.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transformer-datasource-provider.d.ts +0 -15
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transformer-datasource-provider.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transformer-datasource-provider.js +1 -10
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transformer-datasource-provider.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/package.json +7 -3
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/model-datasource/types.ts +50 -18
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/index.ts +0 -6
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/transformer-context-provider.ts +14 -21
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/transformer-datasource-provider.ts +0 -43
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
- package/node_modules/graphql-mapping-template/CHANGELOG.md +4 -0
- package/node_modules/graphql-mapping-template/LICENSE +201 -0
- package/node_modules/graphql-mapping-template/package.json +8 -3
- package/node_modules/graphql-transformer-common/API.md +0 -15
- package/node_modules/graphql-transformer-common/CHANGELOG.md +6 -0
- package/node_modules/graphql-transformer-common/LICENSE +201 -0
- package/node_modules/graphql-transformer-common/lib/ResourceConstants.d.ts +0 -15
- package/node_modules/graphql-transformer-common/lib/ResourceConstants.d.ts.map +1 -1
- package/node_modules/graphql-transformer-common/lib/ResourceConstants.js +0 -15
- package/node_modules/graphql-transformer-common/lib/ResourceConstants.js.map +1 -1
- package/node_modules/graphql-transformer-common/package.json +8 -3
- package/package.json +24 -19
- package/src/amplify-graphql-api.ts +19 -91
- package/src/amplify-graphql-definition.ts +41 -17
- package/src/index.ts +1 -1
- package/src/internal/data-source-config.ts +146 -52
- package/src/internal/model-type-name.ts +3 -2
- package/src/{model-datasource-strategy.ts → model-datasource-strategy-types.ts} +20 -12
- package/src/sql-model-datasource-strategy.ts +3 -3
- package/src/types.ts +1 -9
- package/lib/model-datasource-strategy.js +0 -10
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/provision-strategy-utils.d.ts +0 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/provision-strategy-utils.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/provision-strategy-utils.js +0 -15
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/provision-strategy-utils.js.map +0 -1
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
```ts
|
6
6
|
|
7
|
+
import { AmplifyDynamoDbModelDataSourceStrategy } from '@aws-amplify/graphql-transformer-interfaces';
|
7
8
|
import { APIIAMResourceProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
8
9
|
import { ApiKeyConfig } from 'aws-cdk-lib/aws-appsync';
|
9
10
|
import { AppSyncAuthConfiguration } from '@aws-amplify/graphql-transformer-interfaces';
|
@@ -17,12 +18,10 @@ import { CfnGraphQLSchema } from 'aws-cdk-lib/aws-appsync';
|
|
17
18
|
import { CfnParameter } from 'aws-cdk-lib';
|
18
19
|
import { CfnResource } from 'aws-cdk-lib';
|
19
20
|
import { Construct } from 'constructs';
|
20
|
-
import { CustomSqlDataSourceStrategy } from '@aws-amplify/graphql-transformer-interfaces';
|
21
21
|
import { DataSourceInstance } from '@aws-amplify/graphql-transformer-interfaces';
|
22
22
|
import { DataSourceProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
23
|
-
import {
|
24
|
-
import {
|
25
|
-
import { DBType } from '@aws-amplify/graphql-transformer-interfaces';
|
23
|
+
import { DataSourceStrategiesProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
24
|
+
import { DefaultDynamoDbModelDataSourceStrategy } from '@aws-amplify/graphql-transformer-interfaces';
|
26
25
|
import { DefinitionNode } from 'graphql';
|
27
26
|
import { DirectiveDefinitionNode } from 'graphql';
|
28
27
|
import { DirectiveNode } from 'graphql';
|
@@ -48,6 +47,8 @@ import { Location as Location_2 } from 'graphql';
|
|
48
47
|
import { LogConfig } from 'aws-cdk-lib/aws-appsync';
|
49
48
|
import { MappingTemplateProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
50
49
|
import { ModelDataSourceStrategy } from '@aws-amplify/graphql-transformer-interfaces';
|
50
|
+
import { ModelDataSourceStrategyDbType } from '@aws-amplify/graphql-transformer-interfaces';
|
51
|
+
import { ModelDataSourceStrategySqlDbType } from '@aws-amplify/graphql-transformer-interfaces';
|
51
52
|
import { ModelFieldMap } from '@aws-amplify/graphql-transformer-interfaces';
|
52
53
|
import { MutationFieldType } from '@aws-amplify/graphql-transformer-interfaces';
|
53
54
|
import { NamedTypeNode } from 'graphql';
|
@@ -55,11 +56,12 @@ import { NestedStackProvider } from '@aws-amplify/graphql-transformer-interfaces
|
|
55
56
|
import { ObjectTypeDefinitionNode } from 'graphql';
|
56
57
|
import { ObjectTypeExtensionNode } from 'graphql';
|
57
58
|
import { OperationTypeDefinitionNode } from 'graphql';
|
58
|
-
import { ProvisionedConcurrencyConfig } from '@aws-amplify/graphql-transformer-interfaces';
|
59
59
|
import { QueryFieldType } from '@aws-amplify/graphql-transformer-interfaces';
|
60
60
|
import { RDSLayerMapping } from '@aws-amplify/graphql-transformer-interfaces';
|
61
|
+
import { RDSLayerMappingProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
61
62
|
import { S3MappingTemplateProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
62
63
|
import { SchemaDefinitionNode } from 'graphql';
|
64
|
+
import { SqlDirectiveDataSourceStrategy } from '@aws-amplify/graphql-transformer-interfaces';
|
63
65
|
import { SQLLambdaModelDataSourceStrategy } from '@aws-amplify/graphql-transformer-interfaces';
|
64
66
|
import { Stack } from 'aws-cdk-lib';
|
65
67
|
import { StackManagerProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
@@ -67,7 +69,6 @@ import { StringValueNode } from 'graphql';
|
|
67
69
|
import { SubscriptionFieldType } from '@aws-amplify/graphql-transformer-interfaces';
|
68
70
|
import { SynthParameters } from '@aws-amplify/graphql-transformer-interfaces';
|
69
71
|
import { TransformerAuthProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
70
|
-
import { TransformerBeforeStepContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
71
72
|
import { TransformerContextMetadataProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
72
73
|
import { TransformerContextOutputProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
73
74
|
import { TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
@@ -92,7 +93,6 @@ import { TypeNode } from 'graphql';
|
|
92
93
|
import { TypeSystemDefinitionNode } from 'graphql';
|
93
94
|
import { UnionTypeDefinitionNode } from 'graphql';
|
94
95
|
import { UnionTypeExtensionNode } from 'graphql';
|
95
|
-
import { VpcConfig } from '@aws-amplify/graphql-transformer-interfaces';
|
96
96
|
|
97
97
|
// @public (undocumented)
|
98
98
|
export const APICategory = "api";
|
@@ -120,7 +120,10 @@ export const enum ConflictHandlerType {
|
|
120
120
|
}
|
121
121
|
|
122
122
|
// @public (undocumented)
|
123
|
-
export
|
123
|
+
export const constructDataSourceStrategies: (schema: string, dataSourceStrategy: ModelDataSourceStrategy) => Record<string, ModelDataSourceStrategy>;
|
124
|
+
|
125
|
+
// @public (undocumented)
|
126
|
+
export const constructSqlDirectiveDataSourceStrategies: (schema: string, dataSourceStrategy: ModelDataSourceStrategy, customSqlStatements?: Record<string, string>) => SqlDirectiveDataSourceStrategy[];
|
124
127
|
|
125
128
|
// @public (undocumented)
|
126
129
|
function createSyncLambdaIAMPolicy(context: TransformerContextProvider, scope: Construct, name: string, region?: string): iam.Policy;
|
@@ -131,10 +134,13 @@ function createSyncLambdaIAMPolicy(context: TransformerContextProvider, scope: C
|
|
131
134
|
function createSyncTable(context: TransformerContext): void;
|
132
135
|
|
133
136
|
// @public (undocumented)
|
134
|
-
export const
|
137
|
+
export const DDB_AMPLIFY_MANAGED_DATASOURCE_STRATEGY: ModelDataSourceStrategy;
|
138
|
+
|
139
|
+
// @public (undocumented)
|
140
|
+
export const DDB_DB_TYPE: ModelDataSourceStrategyDbType;
|
135
141
|
|
136
142
|
// @public (undocumented)
|
137
|
-
export const
|
143
|
+
export const DDB_DEFAULT_DATASOURCE_STRATEGY: ModelDataSourceStrategy;
|
138
144
|
|
139
145
|
// @public (undocumented)
|
140
146
|
export class DirectiveWrapper {
|
@@ -194,13 +200,7 @@ export type GetArgumentsOptions = {
|
|
194
200
|
};
|
195
201
|
|
196
202
|
// @public (undocumented)
|
197
|
-
export
|
198
|
-
|
199
|
-
// @public (undocumented)
|
200
|
-
export const getDataSourceType: (type: TypeNode, ctx: TransformerContextProvider) => DBType;
|
201
|
-
|
202
|
-
// @public (undocumented)
|
203
|
-
export const getEngineFromDBType: (dbType: DBType) => ImportedRDSType;
|
203
|
+
export const getDefaultStrategyNameForDbType: (dbType: ModelDataSourceStrategySqlDbType) => string;
|
204
204
|
|
205
205
|
// Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts
|
206
206
|
//
|
@@ -208,11 +208,20 @@ export const getEngineFromDBType: (dbType: DBType) => ImportedRDSType;
|
|
208
208
|
export const getFieldNameFor: (op: Operation, typeName: string) => string;
|
209
209
|
|
210
210
|
// @public (undocumented)
|
211
|
-
export const
|
211
|
+
export const getImportedRDSTypeFromStrategyDbType: (dbType: ModelDataSourceStrategyDbType) => ImportedRDSType;
|
212
212
|
|
213
213
|
// @public (undocumented)
|
214
214
|
export const getKeySchema: (table: any, indexName?: string) => any;
|
215
215
|
|
216
|
+
// @public (undocumented)
|
217
|
+
export const getModelDataSourceNameForTypeName: (ctx: DataSourceStrategiesProvider, typeName: string) => string;
|
218
|
+
|
219
|
+
// @public (undocumented)
|
220
|
+
export const getModelDataSourceStrategy: (ctx: DataSourceStrategiesProvider, typename: string) => ModelDataSourceStrategy;
|
221
|
+
|
222
|
+
// @public (undocumented)
|
223
|
+
export const getModelTypeNames: (schema: string) => string[];
|
224
|
+
|
216
225
|
// @public (undocumented)
|
217
226
|
export const getParameterStoreSecretPath: (secret: string, secretsKey: string, apiName: string, environmentName: string, appId: string) => string;
|
218
227
|
|
@@ -222,9 +231,18 @@ export const getPrimaryKeyFields: (type: ObjectTypeDefinitionNode) => string[];
|
|
222
231
|
// @public (undocumented)
|
223
232
|
export const getResourceName: (scope: Construct) => string | undefined;
|
224
233
|
|
234
|
+
// @public (undocumented)
|
235
|
+
export const getResourceNamesForStrategy: (strategy: SQLLambdaModelDataSourceStrategy) => SQLLambdaResourceNames;
|
236
|
+
|
237
|
+
// @public (undocumented)
|
238
|
+
export const getResourceNamesForStrategyName: (strategyName: string) => SQLLambdaResourceNames;
|
239
|
+
|
225
240
|
// @public (undocumented)
|
226
241
|
export const getSortKeyFieldNames: (type: ObjectTypeDefinitionNode) => string[];
|
227
242
|
|
243
|
+
// @public (undocumented)
|
244
|
+
export const getStrategyDbTypeFromTypeNode: (type: TypeNode, ctx: TransformerContextProvider) => ModelDataSourceStrategyDbType;
|
245
|
+
|
228
246
|
// @public (undocumented)
|
229
247
|
function getSyncConfig(ctx: TransformerTransformSchemaStepContextProvider, typeName: string): SyncConfig | undefined;
|
230
248
|
|
@@ -246,7 +264,7 @@ export class GraphQLTransform {
|
|
246
264
|
// Warning: (ae-forgotten-export) The symbol "TransformOption" needs to be exported by the entry point index.d.ts
|
247
265
|
//
|
248
266
|
// (undocumented)
|
249
|
-
transform({
|
267
|
+
transform({ assetProvider, dataSourceStrategies, nestedStackProvider, parameterProvider, rdsLayerMapping, schema, scope, sqlDirectiveDataSourceStrategies, synthParameters, }: TransformOption): void;
|
250
268
|
}
|
251
269
|
|
252
270
|
// @public (undocumented)
|
@@ -256,13 +274,7 @@ export interface GraphQLTransformOptions {
|
|
256
274
|
// (undocumented)
|
257
275
|
readonly host?: TransformHostProvider;
|
258
276
|
// (undocumented)
|
259
|
-
readonly rdsLayerMapping?: RDSLayerMapping;
|
260
|
-
// (undocumented)
|
261
277
|
readonly resolverConfig?: ResolverConfig;
|
262
|
-
// (undocumented)
|
263
|
-
readonly sqlLambdaProvisionedConcurrencyConfig?: ProvisionedConcurrencyConfig;
|
264
|
-
// (undocumented)
|
265
|
-
readonly sqlLambdaVpcConfig?: VpcConfig;
|
266
278
|
// Warning: (ae-forgotten-export) The symbol "StackMapping" needs to be exported by the entry point index.d.ts
|
267
279
|
//
|
268
280
|
// (undocumented)
|
@@ -363,7 +375,23 @@ export class InvalidTransformerError extends Error {
|
|
363
375
|
}
|
364
376
|
|
365
377
|
// @public (undocumented)
|
366
|
-
export const
|
378
|
+
export const isAmplifyDynamoDbModelDataSourceStrategy: (strategy: ModelDataSourceStrategy) => strategy is AmplifyDynamoDbModelDataSourceStrategy;
|
379
|
+
|
380
|
+
// @public (undocumented)
|
381
|
+
export const isBuiltInGraphqlNode: (obj: DefinitionNode) => obj is ObjectTypeDefinitionNode | (InterfaceTypeDefinitionNode & {
|
382
|
+
name: {
|
383
|
+
value: 'Mutation' | 'Query';
|
384
|
+
};
|
385
|
+
});
|
386
|
+
|
387
|
+
// @public (undocumented)
|
388
|
+
export const isDefaultDynamoDbModelDataSourceStrategy: (strategy: ModelDataSourceStrategy) => strategy is DefaultDynamoDbModelDataSourceStrategy;
|
389
|
+
|
390
|
+
// @public (undocumented)
|
391
|
+
export const isDynamoDbModel: (ctx: DataSourceStrategiesProvider, typename: string) => boolean;
|
392
|
+
|
393
|
+
// @public (undocumented)
|
394
|
+
export const isDynamoDbType: (dbType: ModelDataSourceStrategyDbType) => dbType is "DYNAMODB";
|
367
395
|
|
368
396
|
// @public (undocumented)
|
369
397
|
function isLambdaSyncConfig(syncConfig: SyncConfig): syncConfig is SyncConfigLambda;
|
@@ -386,10 +414,10 @@ export const isQueryNode: (obj: DefinitionNode) => obj is ObjectTypeDefinitionNo
|
|
386
414
|
});
|
387
415
|
|
388
416
|
// @public (undocumented)
|
389
|
-
export const
|
417
|
+
export const isSqlDbType: (dbType: ModelDataSourceStrategyDbType) => dbType is ModelDataSourceStrategySqlDbType;
|
390
418
|
|
391
419
|
// @public (undocumented)
|
392
|
-
export const
|
420
|
+
export const isSqlModel: (ctx: DataSourceStrategiesProvider, typename: string) => boolean;
|
393
421
|
|
394
422
|
// @public (undocumented)
|
395
423
|
export const isSqlStrategy: (strategy: ModelDataSourceStrategy) => strategy is SQLLambdaModelDataSourceStrategy;
|
@@ -407,7 +435,10 @@ export class MappingTemplate {
|
|
407
435
|
}
|
408
436
|
|
409
437
|
// @public (undocumented)
|
410
|
-
export const MYSQL_DB_TYPE:
|
438
|
+
export const MYSQL_DB_TYPE: ModelDataSourceStrategySqlDbType;
|
439
|
+
|
440
|
+
// @public (undocumented)
|
441
|
+
export const normalizeDbType: (candidate: string) => ModelDataSourceStrategyDbType;
|
411
442
|
|
412
443
|
// @public (undocumented)
|
413
444
|
export class ObjectDefinitionWrapper {
|
@@ -433,7 +464,7 @@ export class ObjectDefinitionWrapper {
|
|
433
464
|
}
|
434
465
|
|
435
466
|
// @public (undocumented)
|
436
|
-
export const POSTGRES_DB_TYPE:
|
467
|
+
export const POSTGRES_DB_TYPE: ModelDataSourceStrategySqlDbType;
|
437
468
|
|
438
469
|
// @public (undocumented)
|
439
470
|
export type RDSConnectionSecrets = TransformerSecrets & {
|
@@ -472,6 +503,42 @@ export type SetResourceNameProps = {
|
|
472
503
|
// @public (undocumented)
|
473
504
|
export const SQL_SCHEMA_FILE_NAME = "schema.sql.graphql";
|
474
505
|
|
506
|
+
// @public (undocumented)
|
507
|
+
export interface SQLLambdaResourceNames {
|
508
|
+
// (undocumented)
|
509
|
+
sqlLambdaAliasLogicalId: string;
|
510
|
+
// (undocumented)
|
511
|
+
sqlLambdaAliasName: string;
|
512
|
+
// (undocumented)
|
513
|
+
sqlLambdaDataSource: string;
|
514
|
+
// (undocumented)
|
515
|
+
sqlLambdaExecutionRole: string;
|
516
|
+
// (undocumented)
|
517
|
+
sqlLambdaExecutionRolePolicy: string;
|
518
|
+
// (undocumented)
|
519
|
+
sqlLambdaFunction: string;
|
520
|
+
// (undocumented)
|
521
|
+
sqlLambdaLayerVersion: string;
|
522
|
+
// (undocumented)
|
523
|
+
sqlLayerVersionMapping: string;
|
524
|
+
// (undocumented)
|
525
|
+
sqlLayerVersionResolverCustomResource: string;
|
526
|
+
// (undocumented)
|
527
|
+
sqlPatchingLambdaExecutionRole: string;
|
528
|
+
// (undocumented)
|
529
|
+
sqlPatchingLambdaExecutionRolePolicy: string;
|
530
|
+
// (undocumented)
|
531
|
+
sqlPatchingLambdaFunction: string;
|
532
|
+
// (undocumented)
|
533
|
+
sqlPatchingSubscription: string;
|
534
|
+
// (undocumented)
|
535
|
+
sqlPatchingTopic: string;
|
536
|
+
// (undocumented)
|
537
|
+
sqlStack: string;
|
538
|
+
// (undocumented)
|
539
|
+
sqlVpcEndpointPrefix: string;
|
540
|
+
}
|
541
|
+
|
475
542
|
// @public (undocumented)
|
476
543
|
export class StackManager implements StackManagerProvider {
|
477
544
|
// Warning: (ae-forgotten-export) The symbol "ResourceToStackMap" needs to be exported by the entry point index.d.ts
|
@@ -3,6 +3,13 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
# [2.4.0](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-transformer-core@2.3.3...@aws-amplify/graphql-transformer-core@2.4.0) (2023-12-06)
|
7
|
+
|
8
|
+
### Features
|
9
|
+
|
10
|
+
- combine heterogeneous data sources ([#2109](https://github.com/aws-amplify/amplify-category-api/issues/2109)) ([fd58bb5](https://github.com/aws-amplify/amplify-category-api/commit/fd58bb5af4249220d17c9751acf677955aed74ea))
|
11
|
+
- Support custom SQL across definitions ([#2115](https://github.com/aws-amplify/amplify-category-api/issues/2115)) ([eab4820](https://github.com/aws-amplify/amplify-category-api/commit/eab4820c1c931fbdf804b2315b63773a376e0822))
|
12
|
+
|
6
13
|
## [2.3.3](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-transformer-core@2.3.2...@aws-amplify/graphql-transformer-core@2.3.3) (2023-11-22)
|
7
14
|
|
8
15
|
### Bug Fixes
|
@@ -1,14 +1,14 @@
|
|
1
|
-
export { GraphQLTransform, GraphQLTransformOptions, SyncUtils,
|
1
|
+
export { constructDataSourceStrategies, constructSqlDirectiveDataSourceStrategies, getModelTypeNames, GraphQLTransform, GraphQLTransformOptions, SyncUtils, } from './transformation';
|
2
2
|
export { UserDefinedSlot, UserDefinedResolver } from './transformation/types';
|
3
3
|
export { validateModelSchema } from './transformation/validation';
|
4
4
|
export { ConflictDetectionType, ConflictHandlerType, ResolverConfig, SyncConfig, SyncConfigOptimistic, SyncConfigServer, SyncConfigLambda, TransformConfig, } from './config/index';
|
5
|
-
export { APICategory, collectDirectives, collectDirectivesByTypeNames,
|
5
|
+
export { APICategory, collectDirectives, collectDirectivesByTypeNames, DirectiveWrapper, fieldsWithSqlDirective, generateGetArgumentsInput, GetArgumentsOptions, getModelDataSourceNameForTypeName, getDefaultStrategyNameForDbType, getImportedRDSTypeFromStrategyDbType, getKeySchema, getModelDataSourceStrategy, getParameterStoreSecretPath, getPrimaryKeyFields, getResourceName, getResourceNamesForStrategy, getResourceNamesForStrategyName, getSortKeyFieldNames, getStrategyDbTypeFromTypeNode, getTable, isAmplifyDynamoDbModelDataSourceStrategy, isBuiltInGraphqlNode, isDefaultDynamoDbModelDataSourceStrategy, isDynamoDbModel, isDynamoDbType, isMutationNode, isObjectTypeDefinitionNode, isQueryNode, isSqlDbType, isSqlModel, isSqlStrategy, normalizeDbType, setResourceName, SQLLambdaResourceNames, } from './utils';
|
6
6
|
export type { SetResourceNameProps } from './utils';
|
7
7
|
export * from './utils/operation-names';
|
8
8
|
export * from './errors';
|
9
9
|
export { TransformerModelBase, TransformerModelEnhancerBase, TransformerPluginBase, TransformerAuthBase, } from './transformation/transformer-plugin-base';
|
10
10
|
export { TransformerResolver, StackManager } from './transformer-context';
|
11
|
-
export { DDB_DB_TYPE, ImportAppSyncAPIInputs, ImportedDataSourceType, ImportedRDSType, MYSQL_DB_TYPE, POSTGRES_DB_TYPE,
|
11
|
+
export { DDB_AMPLIFY_MANAGED_DATASOURCE_STRATEGY, DDB_DB_TYPE, DDB_DEFAULT_DATASOURCE_STRATEGY, ImportAppSyncAPIInputs, ImportedDataSourceConfig, ImportedDataSourceType, ImportedRDSType, MYSQL_DB_TYPE, POSTGRES_DB_TYPE, RDSConnectionSecrets, RDSDataSourceConfig, SQL_SCHEMA_FILE_NAME, } from './types';
|
12
12
|
export declare const getAppSyncServiceExtraDirectives: () => string;
|
13
13
|
export { MappingTemplate } from './cdk-compat';
|
14
14
|
export { EnumWrapper, FieldWrapper, InputFieldWrapper, InputObjectDefinitionWrapper, ObjectDefinitionWrapper, } from './wrappers/object-definition-wrapper';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"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sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,SAAS,CAAC;AAIjB,eAAO,MAAM,gCAAgC,QAAO,MAEnD,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EACL,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,sCAAsC,CAAC"}
|
@@ -14,13 +14,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
exports.
|
17
|
+
exports.MYSQL_DB_TYPE = exports.ImportedRDSType = exports.DDB_DEFAULT_DATASOURCE_STRATEGY = exports.DDB_DB_TYPE = exports.DDB_AMPLIFY_MANAGED_DATASOURCE_STRATEGY = exports.StackManager = exports.TransformerResolver = exports.TransformerAuthBase = exports.TransformerPluginBase = exports.TransformerModelEnhancerBase = exports.TransformerModelBase = exports.setResourceName = exports.normalizeDbType = exports.isSqlStrategy = exports.isSqlModel = exports.isSqlDbType = exports.isQueryNode = exports.isObjectTypeDefinitionNode = exports.isMutationNode = exports.isDynamoDbType = exports.isDynamoDbModel = exports.isDefaultDynamoDbModelDataSourceStrategy = exports.isBuiltInGraphqlNode = exports.isAmplifyDynamoDbModelDataSourceStrategy = exports.getTable = exports.getStrategyDbTypeFromTypeNode = exports.getSortKeyFieldNames = exports.getResourceNamesForStrategyName = exports.getResourceNamesForStrategy = exports.getResourceName = exports.getPrimaryKeyFields = exports.getParameterStoreSecretPath = exports.getModelDataSourceStrategy = exports.getKeySchema = exports.getImportedRDSTypeFromStrategyDbType = exports.getDefaultStrategyNameForDbType = exports.getModelDataSourceNameForTypeName = exports.generateGetArgumentsInput = exports.fieldsWithSqlDirective = exports.DirectiveWrapper = exports.collectDirectivesByTypeNames = exports.collectDirectives = exports.APICategory = exports.ConflictHandlerType = exports.validateModelSchema = exports.SyncUtils = exports.GraphQLTransform = exports.getModelTypeNames = exports.constructSqlDirectiveDataSourceStrategies = exports.constructDataSourceStrategies = void 0;
|
18
|
+
exports.ObjectDefinitionWrapper = exports.InputObjectDefinitionWrapper = exports.InputFieldWrapper = exports.FieldWrapper = exports.EnumWrapper = exports.MappingTemplate = exports.getAppSyncServiceExtraDirectives = exports.SQL_SCHEMA_FILE_NAME = exports.POSTGRES_DB_TYPE = void 0;
|
18
19
|
const graphql_1 = require("graphql");
|
19
20
|
const validation_1 = require("./transformation/validation");
|
20
21
|
var transformation_1 = require("./transformation");
|
22
|
+
Object.defineProperty(exports, "constructDataSourceStrategies", { enumerable: true, get: function () { return transformation_1.constructDataSourceStrategies; } });
|
23
|
+
Object.defineProperty(exports, "constructSqlDirectiveDataSourceStrategies", { enumerable: true, get: function () { return transformation_1.constructSqlDirectiveDataSourceStrategies; } });
|
24
|
+
Object.defineProperty(exports, "getModelTypeNames", { enumerable: true, get: function () { return transformation_1.getModelTypeNames; } });
|
21
25
|
Object.defineProperty(exports, "GraphQLTransform", { enumerable: true, get: function () { return transformation_1.GraphQLTransform; } });
|
22
26
|
Object.defineProperty(exports, "SyncUtils", { enumerable: true, get: function () { return transformation_1.SyncUtils; } });
|
23
|
-
Object.defineProperty(exports, "constructDataSourceMap", { enumerable: true, get: function () { return transformation_1.constructDataSourceMap; } });
|
24
27
|
var validation_2 = require("./transformation/validation");
|
25
28
|
Object.defineProperty(exports, "validateModelSchema", { enumerable: true, get: function () { return validation_2.validateModelSchema; } });
|
26
29
|
var index_1 = require("./config/index");
|
@@ -29,27 +32,34 @@ var utils_1 = require("./utils");
|
|
29
32
|
Object.defineProperty(exports, "APICategory", { enumerable: true, get: function () { return utils_1.APICategory; } });
|
30
33
|
Object.defineProperty(exports, "collectDirectives", { enumerable: true, get: function () { return utils_1.collectDirectives; } });
|
31
34
|
Object.defineProperty(exports, "collectDirectivesByTypeNames", { enumerable: true, get: function () { return utils_1.collectDirectivesByTypeNames; } });
|
32
|
-
Object.defineProperty(exports, "dataSourceStrategyToDataSourceType", { enumerable: true, get: function () { return utils_1.dataSourceStrategyToDataSourceType; } });
|
33
35
|
Object.defineProperty(exports, "DirectiveWrapper", { enumerable: true, get: function () { return utils_1.DirectiveWrapper; } });
|
34
36
|
Object.defineProperty(exports, "fieldsWithSqlDirective", { enumerable: true, get: function () { return utils_1.fieldsWithSqlDirective; } });
|
35
37
|
Object.defineProperty(exports, "generateGetArgumentsInput", { enumerable: true, get: function () { return utils_1.generateGetArgumentsInput; } });
|
36
|
-
Object.defineProperty(exports, "
|
37
|
-
Object.defineProperty(exports, "
|
38
|
-
Object.defineProperty(exports, "
|
39
|
-
Object.defineProperty(exports, "getImportedRDSType", { enumerable: true, get: function () { return utils_1.getImportedRDSType; } });
|
38
|
+
Object.defineProperty(exports, "getModelDataSourceNameForTypeName", { enumerable: true, get: function () { return utils_1.getModelDataSourceNameForTypeName; } });
|
39
|
+
Object.defineProperty(exports, "getDefaultStrategyNameForDbType", { enumerable: true, get: function () { return utils_1.getDefaultStrategyNameForDbType; } });
|
40
|
+
Object.defineProperty(exports, "getImportedRDSTypeFromStrategyDbType", { enumerable: true, get: function () { return utils_1.getImportedRDSTypeFromStrategyDbType; } });
|
40
41
|
Object.defineProperty(exports, "getKeySchema", { enumerable: true, get: function () { return utils_1.getKeySchema; } });
|
42
|
+
Object.defineProperty(exports, "getModelDataSourceStrategy", { enumerable: true, get: function () { return utils_1.getModelDataSourceStrategy; } });
|
41
43
|
Object.defineProperty(exports, "getParameterStoreSecretPath", { enumerable: true, get: function () { return utils_1.getParameterStoreSecretPath; } });
|
42
44
|
Object.defineProperty(exports, "getPrimaryKeyFields", { enumerable: true, get: function () { return utils_1.getPrimaryKeyFields; } });
|
43
45
|
Object.defineProperty(exports, "getResourceName", { enumerable: true, get: function () { return utils_1.getResourceName; } });
|
46
|
+
Object.defineProperty(exports, "getResourceNamesForStrategy", { enumerable: true, get: function () { return utils_1.getResourceNamesForStrategy; } });
|
47
|
+
Object.defineProperty(exports, "getResourceNamesForStrategyName", { enumerable: true, get: function () { return utils_1.getResourceNamesForStrategyName; } });
|
44
48
|
Object.defineProperty(exports, "getSortKeyFieldNames", { enumerable: true, get: function () { return utils_1.getSortKeyFieldNames; } });
|
49
|
+
Object.defineProperty(exports, "getStrategyDbTypeFromTypeNode", { enumerable: true, get: function () { return utils_1.getStrategyDbTypeFromTypeNode; } });
|
45
50
|
Object.defineProperty(exports, "getTable", { enumerable: true, get: function () { return utils_1.getTable; } });
|
46
|
-
Object.defineProperty(exports, "
|
51
|
+
Object.defineProperty(exports, "isAmplifyDynamoDbModelDataSourceStrategy", { enumerable: true, get: function () { return utils_1.isAmplifyDynamoDbModelDataSourceStrategy; } });
|
52
|
+
Object.defineProperty(exports, "isBuiltInGraphqlNode", { enumerable: true, get: function () { return utils_1.isBuiltInGraphqlNode; } });
|
53
|
+
Object.defineProperty(exports, "isDefaultDynamoDbModelDataSourceStrategy", { enumerable: true, get: function () { return utils_1.isDefaultDynamoDbModelDataSourceStrategy; } });
|
54
|
+
Object.defineProperty(exports, "isDynamoDbModel", { enumerable: true, get: function () { return utils_1.isDynamoDbModel; } });
|
55
|
+
Object.defineProperty(exports, "isDynamoDbType", { enumerable: true, get: function () { return utils_1.isDynamoDbType; } });
|
47
56
|
Object.defineProperty(exports, "isMutationNode", { enumerable: true, get: function () { return utils_1.isMutationNode; } });
|
48
57
|
Object.defineProperty(exports, "isObjectTypeDefinitionNode", { enumerable: true, get: function () { return utils_1.isObjectTypeDefinitionNode; } });
|
49
58
|
Object.defineProperty(exports, "isQueryNode", { enumerable: true, get: function () { return utils_1.isQueryNode; } });
|
50
|
-
Object.defineProperty(exports, "
|
51
|
-
Object.defineProperty(exports, "
|
59
|
+
Object.defineProperty(exports, "isSqlDbType", { enumerable: true, get: function () { return utils_1.isSqlDbType; } });
|
60
|
+
Object.defineProperty(exports, "isSqlModel", { enumerable: true, get: function () { return utils_1.isSqlModel; } });
|
52
61
|
Object.defineProperty(exports, "isSqlStrategy", { enumerable: true, get: function () { return utils_1.isSqlStrategy; } });
|
62
|
+
Object.defineProperty(exports, "normalizeDbType", { enumerable: true, get: function () { return utils_1.normalizeDbType; } });
|
53
63
|
Object.defineProperty(exports, "setResourceName", { enumerable: true, get: function () { return utils_1.setResourceName; } });
|
54
64
|
__exportStar(require("./utils/operation-names"), exports);
|
55
65
|
__exportStar(require("./errors"), exports);
|
@@ -62,7 +72,9 @@ var transformer_context_1 = require("./transformer-context");
|
|
62
72
|
Object.defineProperty(exports, "TransformerResolver", { enumerable: true, get: function () { return transformer_context_1.TransformerResolver; } });
|
63
73
|
Object.defineProperty(exports, "StackManager", { enumerable: true, get: function () { return transformer_context_1.StackManager; } });
|
64
74
|
var types_1 = require("./types");
|
75
|
+
Object.defineProperty(exports, "DDB_AMPLIFY_MANAGED_DATASOURCE_STRATEGY", { enumerable: true, get: function () { return types_1.DDB_AMPLIFY_MANAGED_DATASOURCE_STRATEGY; } });
|
65
76
|
Object.defineProperty(exports, "DDB_DB_TYPE", { enumerable: true, get: function () { return types_1.DDB_DB_TYPE; } });
|
77
|
+
Object.defineProperty(exports, "DDB_DEFAULT_DATASOURCE_STRATEGY", { enumerable: true, get: function () { return types_1.DDB_DEFAULT_DATASOURCE_STRATEGY; } });
|
66
78
|
Object.defineProperty(exports, "ImportedRDSType", { enumerable: true, get: function () { return types_1.ImportedRDSType; } });
|
67
79
|
Object.defineProperty(exports, "MYSQL_DB_TYPE", { enumerable: true, get: function () { return types_1.MYSQL_DB_TYPE; } });
|
68
80
|
Object.defineProperty(exports, "POSTGRES_DB_TYPE", { enumerable: true, get: function () { return types_1.POSTGRES_DB_TYPE; } });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
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DAAwC;AACxC,2CAAyB;AACzB,oFAKkD;AAJhD,+HAAA,oBAAoB,OAAA;AACpB,uIAAA,4BAA4B,OAAA;AAC5B,gIAAA,qBAAqB,OAAA;AACrB,8HAAA,mBAAmB,OAAA;AAErB,6DAA0E;AAAjE,0HAAA,mBAAmB,OAAA;AAAE,mHAAA,YAAY,OAAA;AAC1C,iCAaiB;AAZf,gIAAA,uCAAuC,OAAA;AACvC,oGAAA,WAAW,OAAA;AACX,wHAAA,+BAA+B,OAAA;AAI/B,wGAAA,eAAe,OAAA;AACf,sGAAA,aAAa,OAAA;AACb,yGAAA,gBAAgB,OAAA;AAGhB,6GAAA,oBAAoB,OAAA;AAKf,MAAM,gCAAgC,GAAG,GAAW,EAAE;IAC3D,OAAO,IAAA,eAAK,EAAC,sCAAyB,CAAC,CAAC;AAC1C,CAAC,CAAC;AAFW,QAAA,gCAAgC,oCAE3C;AAEF,2CAA+C;AAAtC,6GAAA,eAAe,OAAA;AACxB,kFAM8C;AAL5C,wHAAA,WAAW,OAAA;AACX,yHAAA,YAAY,OAAA;AACZ,8HAAA,iBAAiB,OAAA;AACjB,yIAAA,4BAA4B,OAAA;AAC5B,oIAAA,uBAAuB,OAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as SyncUtils from './sync-utils';
|
2
2
|
export { GraphQLTransform, GraphQLTransformOptions } from './transform';
|
3
3
|
export { SyncUtils };
|
4
|
-
export {
|
4
|
+
export { constructDataSourceStrategies, constructSqlDirectiveDataSourceStrategies, getModelTypeNames } from './utils';
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transformation/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transformation/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAE,6BAA6B,EAAE,yCAAyC,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
|
@@ -23,11 +23,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
23
|
return result;
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.
|
26
|
+
exports.getModelTypeNames = exports.constructSqlDirectiveDataSourceStrategies = exports.constructDataSourceStrategies = exports.SyncUtils = exports.GraphQLTransform = void 0;
|
27
27
|
const SyncUtils = __importStar(require("./sync-utils"));
|
28
28
|
exports.SyncUtils = SyncUtils;
|
29
29
|
var transform_1 = require("./transform");
|
30
30
|
Object.defineProperty(exports, "GraphQLTransform", { enumerable: true, get: function () { return transform_1.GraphQLTransform; } });
|
31
31
|
var utils_1 = require("./utils");
|
32
|
-
Object.defineProperty(exports, "
|
32
|
+
Object.defineProperty(exports, "constructDataSourceStrategies", { enumerable: true, get: function () { return utils_1.constructDataSourceStrategies; } });
|
33
|
+
Object.defineProperty(exports, "constructSqlDirectiveDataSourceStrategies", { enumerable: true, get: function () { return utils_1.constructSqlDirectiveDataSourceStrategies; } });
|
34
|
+
Object.defineProperty(exports, "getModelTypeNames", { enumerable: true, get: function () { return utils_1.getModelTypeNames; } });
|
33
35
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transformation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAA0C;AAGjC,8BAAS;AADlB,yCAAwE;AAA/D,6GAAA,gBAAgB,OAAA;AAEzB,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transformation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAA0C;AAGjC,8BAAS;AADlB,yCAAwE;AAA/D,6GAAA,gBAAgB,OAAA;AAEzB,iCAAsH;AAA7G,sHAAA,6BAA6B,OAAA;AAAE,kIAAA,yCAAyC,OAAA;AAAE,0GAAA,iBAAiB,OAAA"}
|
package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
import { AppSyncAuthConfiguration, TransformerPluginProvider, TransformHostProvider, TransformerLog, NestedStackProvider,
|
2
|
-
import type { AssetProvider, StackManagerProvider, TransformParameterProvider, TransformParameters,
|
1
|
+
import { AppSyncAuthConfiguration, TransformerPluginProvider, TransformHostProvider, TransformerLog, NestedStackProvider, SynthParameters } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
+
import type { AssetProvider, StackManagerProvider, TransformParameterProvider, TransformParameters, DataSourceStrategiesProvider, RDSLayerMappingProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
3
3
|
import { DocumentNode } from 'graphql/language';
|
4
4
|
import { Construct } from 'constructs';
|
5
5
|
import { ResolverConfig } from '../config/transformer-config';
|
6
6
|
import { GraphQLApi } from '../graphql-api';
|
7
7
|
import { TransformerOutput } from '../transformer-context/output';
|
8
|
-
import { UserDefinedSlot
|
8
|
+
import { UserDefinedSlot } from './types';
|
9
9
|
export interface GraphQLTransformOptions {
|
10
10
|
readonly transformers: TransformerPluginProvider[];
|
11
11
|
readonly stackMapping?: StackMapping;
|
@@ -14,19 +14,15 @@ export interface GraphQLTransformOptions {
|
|
14
14
|
readonly host?: TransformHostProvider;
|
15
15
|
readonly userDefinedSlots?: Record<string, UserDefinedSlot[]>;
|
16
16
|
readonly resolverConfig?: ResolverConfig;
|
17
|
-
readonly sqlLambdaVpcConfig?: VpcConfig;
|
18
|
-
readonly rdsLayerMapping?: RDSLayerMapping;
|
19
|
-
readonly sqlLambdaProvisionedConcurrencyConfig?: ProvisionedConcurrencyConfig;
|
20
17
|
}
|
21
|
-
export
|
18
|
+
export interface TransformOption extends DataSourceStrategiesProvider, RDSLayerMappingProvider {
|
22
19
|
scope: Construct;
|
23
20
|
nestedStackProvider: NestedStackProvider;
|
24
21
|
parameterProvider?: TransformParameterProvider;
|
25
22
|
assetProvider: AssetProvider;
|
26
23
|
synthParameters: SynthParameters;
|
27
24
|
schema: string;
|
28
|
-
|
29
|
-
};
|
25
|
+
}
|
30
26
|
export type StackMapping = {
|
31
27
|
[resourceId: string]: string;
|
32
28
|
};
|
@@ -37,14 +33,12 @@ export declare class GraphQLTransform {
|
|
37
33
|
private readonly authConfig;
|
38
34
|
private readonly resolverConfig?;
|
39
35
|
private readonly userDefinedSlots;
|
40
|
-
private readonly sqlLambdaVpcConfig?;
|
41
36
|
private readonly transformParameters;
|
42
|
-
private readonly sqlLambdaProvisionedConcurrencyConfig?;
|
43
37
|
private seenTransformations;
|
44
38
|
private logs;
|
45
39
|
constructor(options: GraphQLTransformOptions);
|
46
40
|
preProcessSchema(schema: DocumentNode): DocumentNode;
|
47
|
-
transform({
|
41
|
+
transform({ assetProvider, dataSourceStrategies, nestedStackProvider, parameterProvider, rdsLayerMapping, schema, scope, sqlDirectiveDataSourceStrategies, synthParameters, }: TransformOption): void;
|
48
42
|
protected generateGraphQlApi(stackManager: StackManagerProvider, synthParameters: SynthParameters, output: TransformerOutput, transformParameters: TransformParameters): GraphQLApi;
|
49
43
|
private collectResolvers;
|
50
44
|
private transformObject;
|
package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/transformation/transform.ts"],"names":[],"mappings":"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eAAe;IA4BvB,OAAO,CAAC,cAAc;IA4BtB,OAAO,CAAC,aAAa;IA+BrB,OAAO,CAAC,kBAAkB;IA6B1B,OAAO,CAAC,oBAAoB;IA+B5B,OAAO,CAAC,mBAAmB;IA6BpB,OAAO,IAAI,cAAc,EAAE;CAGnC"}
|
@@ -66,12 +66,10 @@ class GraphQLTransform {
|
|
66
66
|
this.stackMappingOverrides = options.stackMapping || {};
|
67
67
|
this.userDefinedSlots = options.userDefinedSlots || {};
|
68
68
|
this.resolverConfig = options.resolverConfig || {};
|
69
|
-
this.sqlLambdaVpcConfig = options.sqlLambdaVpcConfig;
|
70
69
|
this.transformParameters = {
|
71
70
|
...transform_parameters_1.defaultTransformParameters,
|
72
71
|
...((_a = options.transformParameters) !== null && _a !== void 0 ? _a : {}),
|
73
72
|
};
|
74
|
-
this.sqlLambdaProvisionedConcurrencyConfig = options.sqlLambdaProvisionedConcurrencyConfig;
|
75
73
|
this.logs = [];
|
76
74
|
}
|
77
75
|
preProcessSchema(schema) {
|
@@ -89,25 +87,20 @@ class GraphQLTransform {
|
|
89
87
|
};
|
90
88
|
}, context).inputDocument;
|
91
89
|
}
|
92
|
-
transform({
|
93
|
-
var _a, _b, _c;
|
90
|
+
transform({ assetProvider, dataSourceStrategies, nestedStackProvider, parameterProvider, rdsLayerMapping, schema, scope, sqlDirectiveDataSourceStrategies, synthParameters, }) {
|
94
91
|
this.seenTransformations = {};
|
95
92
|
const parsedDocument = (0, graphql_1.parse)(schema);
|
96
93
|
const context = new transformer_context_1.TransformerContext({
|
97
94
|
assetProvider,
|
98
95
|
authConfig: this.authConfig,
|
99
|
-
|
100
|
-
customSqlDataSourceStrategies: (_b = datasourceConfig === null || datasourceConfig === void 0 ? void 0 : datasourceConfig.customSqlDataSourceStrategies) !== null && _b !== void 0 ? _b : [],
|
101
|
-
datasourceSecretParameterLocations: datasourceConfig === null || datasourceConfig === void 0 ? void 0 : datasourceConfig.datasourceSecretParameterLocations,
|
96
|
+
dataSourceStrategies: dataSourceStrategies,
|
102
97
|
inputDocument: parsedDocument,
|
103
|
-
modelToDatasourceMap: (_c = datasourceConfig === null || datasourceConfig === void 0 ? void 0 : datasourceConfig.modelToDatasourceMap) !== null && _c !== void 0 ? _c : new Map(),
|
104
98
|
nestedStackProvider,
|
105
99
|
parameterProvider,
|
106
|
-
rdsLayerMapping
|
100
|
+
rdsLayerMapping,
|
107
101
|
resolverConfig: this.resolverConfig,
|
108
102
|
scope,
|
109
|
-
|
110
|
-
sqlLambdaVpcConfig: this.sqlLambdaVpcConfig,
|
103
|
+
sqlDirectiveDataSourceStrategies: sqlDirectiveDataSourceStrategies !== null && sqlDirectiveDataSourceStrategies !== void 0 ? sqlDirectiveDataSourceStrategies : [],
|
111
104
|
stackMapping: this.stackMappingOverrides,
|
112
105
|
synthParameters,
|
113
106
|
transformParameters: this.transformParameters,
|