@aws-amplify/graphql-api-construct 1.4.2 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.jsii +367 -278
- package/API.md +14 -3
- package/CHANGELOG.md +18 -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 -65
- package/lib/amplify-graphql-definition.d.ts +4 -15
- package/lib/amplify-graphql-definition.js +33 -30
- package/lib/index.d.ts +2 -1
- package/lib/index.js +16 -1
- package/lib/internal/data-source-config.d.ts +22 -9
- package/lib/internal/data-source-config.js +150 -39
- package/lib/internal/model-type-name.d.ts +3 -3
- package/lib/internal/model-type-name.js +7 -7
- package/lib/model-datasource-strategy-types.d.ts +122 -0
- 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 +12 -119
- package/lib/types.js +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +10 -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 +10 -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 +10 -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 +8 -0
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +11 -7
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +10 -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 +10 -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 +16 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +13 -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/index.d.ts +1 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/index.js +3 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/index.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 +8 -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 +12 -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 +10 -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 +12 -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 +32 -12
- 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 +4 -16
- package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +10 -0
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.d.ts +4 -13
- 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 -14
- 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 -54
- package/node_modules/@aws-amplify/graphql-transformer-core/API.md +128 -31
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +13 -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 +34 -16
- 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 +16 -5
- 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 -8
- 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 +18 -12
- 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 +13 -15
- 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 +28 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/graphql-utils.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/graphql-utils.js +39 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/graphql-utils.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/index.d.ts +5 -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 +21 -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 +14 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js +96 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js.map +1 -0
- 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 +88 -40
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +10 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/graphql-api-provider.d.ts +0 -17
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/graphql-api-provider.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/graphql-api-provider.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/index.d.ts +2 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/index.js +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/index.d.ts +2 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/index.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/index.js +18 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/index.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts +59 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.js +3 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transform-host-provider.d.ts +2 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transform-host-provider.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/index.d.ts +2 -2
- 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 +12 -17
- 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 +8 -3
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/graphql-api-provider.ts +1 -41
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/index.ts +1 -4
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/model-datasource/index.ts +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/model-datasource/types.ts +195 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transform-host-provider.ts +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/index.ts +4 -9
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/transformer-context-provider.ts +15 -23
- 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/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 +7 -3
- package/package.json +24 -19
- package/src/amplify-graphql-api.ts +19 -76
- package/src/amplify-graphql-definition.ts +47 -30
- package/src/index.ts +2 -10
- package/src/internal/data-source-config.ts +195 -47
- package/src/internal/model-type-name.ts +5 -4
- package/src/model-datasource-strategy-types.ts +157 -0
- package/src/sql-model-datasource-strategy.ts +3 -3
- package/src/types.ts +13 -144
- 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
package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
export type ModelDataSourceStrategy = DefaultDynamoDbModelDataSourceStrategy | AmplifyDynamoDbModelDataSourceStrategy | SQLLambdaModelDataSourceStrategy;
|
2
|
+
export interface ModelDataSourceStrategyBase {
|
3
|
+
dbType: ModelDataSourceStrategyDbType;
|
4
|
+
}
|
5
|
+
export type ModelDataSourceStrategyDbType = 'DYNAMODB' | ModelDataSourceStrategySqlDbType;
|
6
|
+
export type ModelDataSourceStrategySqlDbType = 'MYSQL' | 'POSTGRES';
|
7
|
+
export interface DefaultDynamoDbModelDataSourceStrategy extends ModelDataSourceStrategyBase {
|
8
|
+
readonly dbType: 'DYNAMODB';
|
9
|
+
readonly provisionStrategy: 'DEFAULT';
|
10
|
+
}
|
11
|
+
export interface AmplifyDynamoDbModelDataSourceStrategy extends ModelDataSourceStrategyBase {
|
12
|
+
readonly dbType: 'DYNAMODB';
|
13
|
+
readonly provisionStrategy: 'AMPLIFY_TABLE';
|
14
|
+
}
|
15
|
+
export interface SQLLambdaModelDataSourceStrategy extends ModelDataSourceStrategyBase {
|
16
|
+
readonly name: string;
|
17
|
+
readonly dbType: ModelDataSourceStrategySqlDbType;
|
18
|
+
readonly dbConnectionConfig: SqlModelDataSourceDbConnectionConfig;
|
19
|
+
readonly vpcConfiguration?: VpcConfig;
|
20
|
+
readonly sqlLambdaProvisionedConcurrencyConfig?: ProvisionedConcurrencyConfig;
|
21
|
+
}
|
22
|
+
export interface VpcConfig {
|
23
|
+
readonly vpcId: string;
|
24
|
+
readonly securityGroupIds: string[];
|
25
|
+
readonly subnetAvailabilityZoneConfig: SubnetAvailabilityZone[];
|
26
|
+
}
|
27
|
+
export interface ProvisionedConcurrencyConfig {
|
28
|
+
readonly provisionedConcurrentExecutions: number;
|
29
|
+
}
|
30
|
+
export interface SubnetAvailabilityZone {
|
31
|
+
readonly subnetId: string;
|
32
|
+
readonly availabilityZone: string;
|
33
|
+
}
|
34
|
+
export interface SqlModelDataSourceDbConnectionConfig {
|
35
|
+
readonly hostnameSsmPath: string;
|
36
|
+
readonly portSsmPath: string;
|
37
|
+
readonly usernameSsmPath: string;
|
38
|
+
readonly passwordSsmPath: string;
|
39
|
+
readonly databaseNameSsmPath: string;
|
40
|
+
}
|
41
|
+
export interface SqlDirectiveDataSourceStrategy {
|
42
|
+
readonly typeName: 'Query' | 'Mutation';
|
43
|
+
readonly fieldName: string;
|
44
|
+
readonly strategy: SQLLambdaModelDataSourceStrategy;
|
45
|
+
readonly customSqlStatements?: Record<string, string>;
|
46
|
+
}
|
47
|
+
export interface DataSourceStrategiesProvider {
|
48
|
+
dataSourceStrategies: Record<string, ModelDataSourceStrategy>;
|
49
|
+
sqlDirectiveDataSourceStrategies?: SqlDirectiveDataSourceStrategy[];
|
50
|
+
}
|
51
|
+
export interface RDSLayerMapping {
|
52
|
+
readonly [key: string]: {
|
53
|
+
layerRegion: string;
|
54
|
+
};
|
55
|
+
}
|
56
|
+
export interface RDSLayerMappingProvider {
|
57
|
+
rdsLayerMapping?: RDSLayerMapping;
|
58
|
+
}
|
59
|
+
//# sourceMappingURL=types.d.ts.map
|
package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/model-datasource/types.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,uBAAuB,GAC/B,sCAAsC,GACtC,sCAAsC,GACtC,gCAAgC,CAAC;AAErC,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,6BAA6B,CAAC;CACvC;AAKD,MAAM,MAAM,6BAA6B,GAAG,UAAU,GAAG,gCAAgC,CAAC;AAK1F,MAAM,MAAM,gCAAgC,GAAG,OAAO,GAAG,UAAU,CAAC;AAKpE,MAAM,WAAW,sCAAuC,SAAQ,2BAA2B;IACzF,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,iBAAiB,EAAE,SAAS,CAAC;CACvC;AAKD,MAAM,WAAW,sCAAuC,SAAQ,2BAA2B;IACzF,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,iBAAiB,EAAE,eAAe,CAAC;CAC7C;AAQD,MAAM,WAAW,gCAAiC,SAAQ,2BAA2B;IAKnF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAKtB,QAAQ,CAAC,MAAM,EAAE,gCAAgC,CAAC;IAKlD,QAAQ,CAAC,kBAAkB,EAAE,oCAAoC,CAAC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AAG;QACtB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAMD,MAAM,WAAW,uBAAuB;IACtC,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC"}
|
package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/model-datasource/types.ts"],"names":[],"mappings":""}
|
package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transform-host-provider.d.ts
CHANGED
@@ -4,7 +4,8 @@ import { ITable } from 'aws-cdk-lib/aws-dynamodb';
|
|
4
4
|
import { IFunction, ILayerVersion, Runtime } from 'aws-cdk-lib/aws-lambda';
|
5
5
|
import { IRole } from 'aws-cdk-lib/aws-iam';
|
6
6
|
import { Construct } from 'constructs';
|
7
|
-
import { AppSyncFunctionConfigurationProvider, DataSourceOptions, SearchableDataSourceOptions, MappingTemplateProvider
|
7
|
+
import { AppSyncFunctionConfigurationProvider, DataSourceOptions, SearchableDataSourceOptions, MappingTemplateProvider } from './graphql-api-provider';
|
8
|
+
import { VpcConfig } from './model-datasource';
|
8
9
|
export interface DynamoDbDataSourceOptions extends DataSourceOptions {
|
9
10
|
readonly serviceRole: IRole;
|
10
11
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transform-host-provider.d.ts","sourceRoot":"","sources":["../src/transform-host-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,WAAW,EACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,KAAK,EAAE,M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,EACjB,GAAG,CAAC,EAAE,SAAS,KACZ,SAAS,CAAC;IAEf,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,cAAc,GAAG,IAAI,CAAC;IACvD,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAEzC,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,WAAW,GAAG,IAAI,CAAC;IACzE,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;CAC/D"}
|
package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/index.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
export { DataSourceProvider, TransformerDataSourceManagerProvider, AppSyncDataSourceType, DataSourceInstance,
|
1
|
+
export { DataSourceProvider, TransformerDataSourceManagerProvider, AppSyncDataSourceType, DataSourceInstance, } from './transformer-datasource-provider';
|
2
2
|
export { TransformerContextOutputProvider } from './transformer-context-output-provider';
|
3
3
|
export { TransformerProviderRegistry } from './transformer-provider-registry';
|
4
4
|
export { TransformerResolverProvider, TransformerResolversManagerProvider } from './transformer-resolver-provider';
|
5
5
|
export * from './resource-resource-provider';
|
6
|
-
export {
|
6
|
+
export { TransformerBeforeStepContextProvider, TransformerContextMetadataProvider, TransformerContextProvider, TransformerPrepareStepContextProvider, TransformerSchemaVisitStepContextProvider, TransformerSecrets, TransformerTransformSchemaStepContextProvider, TransformerValidationStepContextProvider, } from './transformer-context-provider';
|
7
7
|
export { TransformerSchemaHelperProvider } from './schema-helper-provider';
|
8
8
|
export { TransformerPreProcessContextProvider } from './transformer-preprocess-context-provider';
|
9
9
|
export { StackManagerProvider } from './stack-manager-provider';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transformer-context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oCAAoC,EACpC,qBAAqB,EACrB,kBAAkB,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transformer-context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oCAAoC,EACpC,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,mCAAmC,EAAE,MAAM,iCAAiC,CAAC;AACnH,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EACL,oCAAoC,EACpC,kCAAkC,EAClC,0BAA0B,EAC1B,qCAAqC,EACrC,yCAAyC,EACzC,kBAAkB,EAClB,6CAA6C,EAC7C,wCAAwC,GACzC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,oCAAoC,EAAE,MAAM,2CAA2C,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC"}
|
package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/index.js
CHANGED
@@ -14,10 +14,8 @@ 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.AppSyncDataSourceType = void 0;
|
18
18
|
var transformer_datasource_provider_1 = require("./transformer-datasource-provider");
|
19
19
|
Object.defineProperty(exports, "AppSyncDataSourceType", { enumerable: true, get: function () { return transformer_datasource_provider_1.AppSyncDataSourceType; } });
|
20
|
-
Object.defineProperty(exports, "DynamoDBProvisionStrategy", { enumerable: true, get: function () { return transformer_datasource_provider_1.DynamoDBProvisionStrategy; } });
|
21
|
-
Object.defineProperty(exports, "SQLLambdaModelProvisionStrategy", { enumerable: true, get: function () { return transformer_datasource_provider_1.SQLLambdaModelProvisionStrategy; } });
|
22
20
|
__exportStar(require("./resource-resource-provider"), exports);
|
23
21
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transformer-context/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transformer-context/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qFAK2C;AAFzC,wIAAA,qBAAqB,OAAA;AAMvB,+DAA6C"}
|
@@ -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 { DataSourceStrategiesProvider, RDSLayerMappingProvider } from '../model-datasource';
|
4
|
+
import { TransformerDataSourceManagerProvider } 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';
|
@@ -9,21 +10,19 @@ import { TransformParameters } from './transform-parameters';
|
|
9
10
|
import { TransformerResolversManagerProvider } from './transformer-resolver-provider';
|
10
11
|
import { SynthParameters } from './synth-parameters';
|
11
12
|
export interface TransformerContextMetadataProvider {
|
12
|
-
set<T>(key: string, value: T)
|
13
|
-
get<T>(key: string)
|
14
|
-
has(key: string)
|
13
|
+
set: <T>(key: string, value: T) => void;
|
14
|
+
get: <T>(key: string) => T | undefined;
|
15
|
+
has: (key: string) => boolean;
|
15
16
|
}
|
16
17
|
export type TransformerSecrets = {
|
17
18
|
[key: string]: any;
|
18
19
|
};
|
19
|
-
export interface TransformerContextProvider {
|
20
|
+
export interface TransformerContextProvider extends DataSourceStrategiesProvider, RDSLayerMappingProvider {
|
20
21
|
metadata: TransformerContextMetadataProvider;
|
21
22
|
resolvers: TransformerResolversManagerProvider;
|
22
23
|
dataSources: TransformerDataSourceManagerProvider;
|
23
24
|
providerRegistry: TransformerProviderRegistry;
|
24
25
|
inputDocument: DocumentNode;
|
25
|
-
modelToDatasourceMap: Map<string, DataSourceType>;
|
26
|
-
datasourceSecretParameterLocations: Map<string, TransformerSecrets>;
|
27
26
|
output: TransformerContextOutputProvider;
|
28
27
|
stackManager: StackManagerProvider;
|
29
28
|
api: GraphQLAPIProvider;
|
@@ -31,16 +30,12 @@ export interface TransformerContextProvider {
|
|
31
30
|
authConfig: AppSyncAuthConfiguration;
|
32
31
|
transformParameters: TransformParameters;
|
33
32
|
synthParameters: SynthParameters;
|
34
|
-
|
35
|
-
|
36
|
-
getResolverConfig<ResolverConfig>(): ResolverConfig | undefined;
|
37
|
-
readonly sqlLambdaVpcConfig?: VpcConfig;
|
38
|
-
readonly rdsLayerMapping?: RDSLayerMapping;
|
39
|
-
readonly sqlLambdaProvisionedConcurrencyConfig?: ProvisionedConcurrencyConfig;
|
33
|
+
isProjectUsingDataStore: () => boolean;
|
34
|
+
getResolverConfig: <ResolverConfig>() => ResolverConfig | undefined;
|
40
35
|
}
|
41
|
-
export type TransformerBeforeStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | '
|
42
|
-
export type TransformerSchemaVisitStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | '
|
43
|
-
export type TransformerValidationStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | '
|
36
|
+
export type TransformerBeforeStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | 'dataSourceStrategies' | 'sqlDirectiveDataSourceStrategies' | 'transformParameters' | 'isProjectUsingDataStore' | 'getResolverConfig' | 'authConfig' | 'stackManager' | 'synthParameters'>;
|
37
|
+
export type TransformerSchemaVisitStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | 'dataSourceStrategies' | 'sqlDirectiveDataSourceStrategies' | 'output' | 'providerRegistry' | 'transformParameters' | 'isProjectUsingDataStore' | 'getResolverConfig' | 'metadata' | 'authConfig' | 'resourceHelper'>;
|
38
|
+
export type TransformerValidationStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | 'dataSourceStrategies' | 'sqlDirectiveDataSourceStrategies' | 'output' | 'providerRegistry' | 'dataSources' | 'transformParameters' | 'isProjectUsingDataStore' | 'getResolverConfig' | 'metadata' | 'authConfig' | 'resourceHelper' | 'resolvers' | 'stackManager' | 'synthParameters'>;
|
44
39
|
export type TransformerPrepareStepContextProvider = TransformerValidationStepContextProvider;
|
45
40
|
export type TransformerTransformSchemaStepContextProvider = TransformerValidationStepContextProvider;
|
46
41
|
//# 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,
|
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,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EAAE,oCAAoC,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC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C;CACrE;AAED,MAAM,MAAM,oCAAoC,GAAG,IAAI,CACrD,0BAA0B,EACxB,eAAe,GACf,sBAAsB,GACtB,kCAAkC,GAClC,qBAAqB,GACrB,yBAAyB,GACzB,mBAAmB,GACnB,YAAY,GACZ,cAAc,GACd,iBAAiB,CACpB,CAAC;AAEF,MAAM,MAAM,yCAAyC,GAAG,IAAI,CAC1D,0BAA0B,EACxB,eAAe,GACf,sBAAsB,GACtB,kCAAkC,GAClC,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,yBAAyB,GACzB,mBAAmB,GACnB,UAAU,GACV,YAAY,GACZ,gBAAgB,CACnB,CAAC;AAEF,MAAM,MAAM,wCAAwC,GAAG,IAAI,CACzD,0BAA0B,EACxB,eAAe,GACf,sBAAsB,GACtB,kCAAkC,GAClC,QAAQ,GACR,kBAAkB,GAClB,aAAa,GACb,qBAAqB,GACrB,yBAAyB,GACzB,mBAAmB,GACnB,UAAU,GACV,YAAY,GACZ,gBAAgB,GAChB,WAAW,GACX,cAAc,GACd,iBAAiB,CACpB,CAAC;AAEF,MAAM,MAAM,qCAAqC,GAAG,wCAAwC,CAAC;AAE7F,MAAM,MAAM,6CAA6C,GAAG,wCAAwC,CAAC"}
|
@@ -22,19 +22,4 @@ export interface TransformerDataSourceManagerProvider {
|
|
22
22
|
}
|
23
23
|
export interface DataSourceProvider extends BackedDataSource {
|
24
24
|
}
|
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 {
|
36
|
-
dbType: DBType;
|
37
|
-
provisionDB: boolean;
|
38
|
-
provisionStrategy: DataSourceProvisionStrategy;
|
39
|
-
}
|
40
25
|
//# 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,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
|
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"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.AppSyncDataSourceType = void 0;
|
4
4
|
var AppSyncDataSourceType;
|
5
5
|
(function (AppSyncDataSourceType) {
|
6
6
|
AppSyncDataSourceType["AMAZON_DYNAMODB"] = "AMAZON_DYNAMODB";
|
@@ -10,13 +10,4 @@ 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 = {}));
|
22
13
|
//# 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"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-amplify/graphql-transformer-interfaces",
|
3
|
-
"version": "3.3.
|
3
|
+
"version": "3.3.2",
|
4
4
|
"description": "Amplify GraphQL transformer interface definitions",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -47,6 +47,11 @@
|
|
47
47
|
"json",
|
48
48
|
"node"
|
49
49
|
],
|
50
|
-
"collectCoverage": true
|
51
|
-
|
50
|
+
"collectCoverage": true,
|
51
|
+
"coverageReporters": [
|
52
|
+
"clover",
|
53
|
+
"text"
|
54
|
+
]
|
55
|
+
},
|
56
|
+
"gitHead": "6e450d037cf84098b51ce787a99d6023cbc0e39d"
|
52
57
|
}
|
package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/graphql-api-provider.ts
CHANGED
@@ -74,51 +74,11 @@ export interface LambdaConfig {
|
|
74
74
|
ttlSeconds?: number;
|
75
75
|
}
|
76
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
|
-
* @experimental
|
84
|
-
*/
|
85
|
-
export interface VpcConfig {
|
86
|
-
/** The VPC to install the Lambda data source in. */
|
87
|
-
readonly vpcId: string;
|
88
|
-
|
89
|
-
/** The security groups to install the Lambda data source in. */
|
90
|
-
readonly securityGroupIds: string[];
|
91
|
-
|
92
|
-
/** The subnets to install the Lambda data source in, one per availability zone. */
|
93
|
-
readonly subnetAvailabilityZoneConfig: SubnetAvailabilityZone[];
|
94
|
-
}
|
95
|
-
|
96
|
-
export interface ProvisionedConcurrencyConfig {
|
97
|
-
readonly provisionedConcurrentExecutions: number;
|
98
|
-
}
|
99
|
-
|
100
|
-
/**
|
101
|
-
* Although it is possible to create multiple subnets in a single availability zone, VPC Endpoints may only be deployed to a single subnet
|
102
|
-
* in a given availability zone. We use this structure to ensure that the Lambda function and VPC endpoints are mutually consistent.
|
103
|
-
*/
|
104
|
-
export interface SubnetAvailabilityZone {
|
105
|
-
readonly subnetId: string;
|
106
|
-
readonly availabilityZone: string;
|
107
|
-
}
|
108
|
-
|
109
|
-
/**
|
110
|
-
* Maps a given AWS region to the SQL Lambda layer version ARN for that region. TODO: Rename to SQLLambdaLayerMapping
|
111
|
-
*/
|
112
|
-
export interface RDSLayerMapping {
|
113
|
-
readonly [key: string]: {
|
114
|
-
layerRegion: string;
|
115
|
-
};
|
116
|
-
}
|
117
|
-
|
118
77
|
export interface AppSyncFunctionConfigurationProvider extends IConstruct {
|
119
78
|
readonly arn: string;
|
120
79
|
readonly functionId: string;
|
121
80
|
}
|
81
|
+
|
122
82
|
export interface DataSourceOptions {
|
123
83
|
/**
|
124
84
|
* The name of the data source, overrides the id given by cdk
|
@@ -28,14 +28,11 @@ export {
|
|
28
28
|
AppSyncAuthConfigurationUserPoolEntry,
|
29
29
|
AppSyncAuthMode,
|
30
30
|
UserPoolConfig,
|
31
|
-
VpcConfig,
|
32
|
-
SubnetAvailabilityZone,
|
33
31
|
SearchableDataSourceOptions,
|
34
|
-
RDSLayerMapping,
|
35
|
-
ProvisionedConcurrencyConfig,
|
36
32
|
} from './graphql-api-provider';
|
37
33
|
export { TransformHostProvider, DynamoDbDataSourceOptions } from './transform-host-provider';
|
38
34
|
export { TransformerLog, TransformerLogLevel } from './transformer-log';
|
39
35
|
export type { TransformParameters } from './transformer-context/transform-parameters';
|
40
36
|
export type { NestedStackProvider } from './nested-stack-provider';
|
41
37
|
export type { AssetProps, AssetProvider, S3Asset } from './asset-provider';
|
38
|
+
export * from './model-datasource';
|
package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/model-datasource/index.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from './types';
|
package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/model-datasource/types.ts
ADDED
@@ -0,0 +1,195 @@
|
|
1
|
+
// #########################################################################################################################################
|
2
|
+
// If you change types in this file (the internal implementation), be sure to make corresponding necessary changes to
|
3
|
+
// amplify-graphql-api-construct/src/model-datasource-strategy.ts (the customer-facing interface) and the adapter functions in this file.
|
4
|
+
// #########################################################################################################################################
|
5
|
+
|
6
|
+
/**
|
7
|
+
* All known ModelDataSourceStrategies. Concrete strategies vary widely in their requirements and implementations.
|
8
|
+
*/
|
9
|
+
export type ModelDataSourceStrategy =
|
10
|
+
| DefaultDynamoDbModelDataSourceStrategy
|
11
|
+
| AmplifyDynamoDbModelDataSourceStrategy
|
12
|
+
| SQLLambdaModelDataSourceStrategy;
|
13
|
+
|
14
|
+
export interface ModelDataSourceStrategyBase {
|
15
|
+
dbType: ModelDataSourceStrategyDbType;
|
16
|
+
}
|
17
|
+
|
18
|
+
/**
|
19
|
+
* All supported database types that can be used to resolve models.
|
20
|
+
*/
|
21
|
+
export type ModelDataSourceStrategyDbType = 'DYNAMODB' | ModelDataSourceStrategySqlDbType;
|
22
|
+
|
23
|
+
/**
|
24
|
+
* All supported SQL database types that can be used to resolve models.
|
25
|
+
*/
|
26
|
+
export type ModelDataSourceStrategySqlDbType = 'MYSQL' | 'POSTGRES';
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Use default CloudFormation type 'AWS::DynamoDB::Table' to provision table.
|
30
|
+
*/
|
31
|
+
export interface DefaultDynamoDbModelDataSourceStrategy extends ModelDataSourceStrategyBase {
|
32
|
+
readonly dbType: 'DYNAMODB';
|
33
|
+
readonly provisionStrategy: 'DEFAULT';
|
34
|
+
}
|
35
|
+
|
36
|
+
/**
|
37
|
+
* Use custom resource type 'Custom::AmplifyDynamoDBTable' to provision table.
|
38
|
+
*/
|
39
|
+
export interface AmplifyDynamoDbModelDataSourceStrategy extends ModelDataSourceStrategyBase {
|
40
|
+
readonly dbType: 'DYNAMODB';
|
41
|
+
readonly provisionStrategy: 'AMPLIFY_TABLE';
|
42
|
+
}
|
43
|
+
|
44
|
+
/**
|
45
|
+
* A strategy that creates a Lambda to connect to a pre-existing SQL table to resolve model data.
|
46
|
+
*
|
47
|
+
* Note: The implementation type is different from the interface type: the interface type contains the custom SQL statements that are
|
48
|
+
* reference by the `@sql` `reference` attribute, while the implementation moves those into the SqlDirectiveDataSourceStrategy type.
|
49
|
+
*/
|
50
|
+
export interface SQLLambdaModelDataSourceStrategy extends ModelDataSourceStrategyBase {
|
51
|
+
/**
|
52
|
+
* The name of the strategy. This will be used to name the AppSync DataSource itself, plus any associated resources like resolver Lambdas.
|
53
|
+
* This name must be unique across all schema definitions in a GraphQL API.
|
54
|
+
*/
|
55
|
+
readonly name: string;
|
56
|
+
|
57
|
+
/**
|
58
|
+
* The type of the SQL database used to process model operations for this definition.
|
59
|
+
*/
|
60
|
+
readonly dbType: ModelDataSourceStrategySqlDbType;
|
61
|
+
|
62
|
+
/**
|
63
|
+
* The parameters the Lambda data source will use to connect to the database.
|
64
|
+
*/
|
65
|
+
readonly dbConnectionConfig: SqlModelDataSourceDbConnectionConfig;
|
66
|
+
|
67
|
+
/**
|
68
|
+
* The configuration of the VPC into which to install the Lambda.
|
69
|
+
*/
|
70
|
+
readonly vpcConfiguration?: VpcConfig;
|
71
|
+
|
72
|
+
/**
|
73
|
+
* The configuration for the provisioned concurrency of the Lambda.
|
74
|
+
*/
|
75
|
+
readonly sqlLambdaProvisionedConcurrencyConfig?: ProvisionedConcurrencyConfig;
|
76
|
+
}
|
77
|
+
|
78
|
+
/**
|
79
|
+
* 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
|
80
|
+
* into the specified VPC, subnets, and security groups. The specified subnets and security groups must be in the same VPC. The VPC must
|
81
|
+
* have at least one subnet. The construct will also create VPC service endpoints in the specified subnets, as well as inbound security
|
82
|
+
* rules, to allow traffic on port 443 within each security group. This allows the Lambda to read database connection information from
|
83
|
+
* Secure Systems Manager.
|
84
|
+
*/
|
85
|
+
export interface VpcConfig {
|
86
|
+
/** The VPC to install the Lambda data source in. */
|
87
|
+
readonly vpcId: string;
|
88
|
+
|
89
|
+
/** The security groups to install the Lambda data source in. */
|
90
|
+
readonly securityGroupIds: string[];
|
91
|
+
|
92
|
+
/** The subnets to install the Lambda data source in, one per availability zone. */
|
93
|
+
readonly subnetAvailabilityZoneConfig: SubnetAvailabilityZone[];
|
94
|
+
}
|
95
|
+
|
96
|
+
/**
|
97
|
+
* The configuration for the provisioned concurrency of the Lambda.
|
98
|
+
*/
|
99
|
+
export interface ProvisionedConcurrencyConfig {
|
100
|
+
/** The amount of provisioned concurrency to allocate. **/
|
101
|
+
readonly provisionedConcurrentExecutions: number;
|
102
|
+
}
|
103
|
+
|
104
|
+
/**
|
105
|
+
* Subnet configuration for VPC endpoints used by a Lambda resolver for a SQL-based data source. Although it is possible to create multiple
|
106
|
+
* subnets in a single availability zone, VPC service endpoints may only be deployed to a single subnet in a given availability zone. This
|
107
|
+
* structure ensures that the Lambda function and VPC service endpoints are mutually consistent.
|
108
|
+
*/
|
109
|
+
export interface SubnetAvailabilityZone {
|
110
|
+
/** The subnet ID to install the Lambda data source in. */
|
111
|
+
readonly subnetId: string;
|
112
|
+
|
113
|
+
/** The availability zone of the subnet. */
|
114
|
+
readonly availabilityZone: string;
|
115
|
+
}
|
116
|
+
|
117
|
+
/**
|
118
|
+
* The Secure Systems Manager parameter paths the Lambda data source will use to connect to the database.
|
119
|
+
*
|
120
|
+
* These parameters are retrieved from Secure Systems Manager in the same region as the Lambda.
|
121
|
+
*/
|
122
|
+
export interface SqlModelDataSourceDbConnectionConfig {
|
123
|
+
/** The Secure Systems Manager parameter containing the hostname of the database. For RDS-based SQL data sources, this can be the hostname
|
124
|
+
* of a database proxy, cluster, or instance.
|
125
|
+
*/
|
126
|
+
readonly hostnameSsmPath: string;
|
127
|
+
|
128
|
+
/** The Secure Systems Manager parameter containing the port number of the database proxy, cluster, or instance. */
|
129
|
+
readonly portSsmPath: string;
|
130
|
+
|
131
|
+
/** The Secure Systems Manager parameter containing the username to use when connecting to the database. */
|
132
|
+
readonly usernameSsmPath: string;
|
133
|
+
|
134
|
+
/** The Secure Systems Manager parameter containing the password to use when connecting to the database. */
|
135
|
+
readonly passwordSsmPath: string;
|
136
|
+
|
137
|
+
/** The Secure Systems Manager parameter containing the database name. */
|
138
|
+
readonly databaseNameSsmPath: string;
|
139
|
+
}
|
140
|
+
|
141
|
+
/**
|
142
|
+
* The internal implementation type for defining a ModelDataSourceStrategy used to resolve a field annotated with a `@sql` directive.
|
143
|
+
*
|
144
|
+
* Note: The implementation type is different from the interface type: it directly contains the SQL statement to be executed rather than
|
145
|
+
* passing a map.
|
146
|
+
*/
|
147
|
+
export interface SqlDirectiveDataSourceStrategy {
|
148
|
+
/** The built-in type (either "Query" or "Mutation") with which the custom SQL is associated */
|
149
|
+
readonly typeName: 'Query' | 'Mutation';
|
150
|
+
|
151
|
+
/** The field name with which the custom SQL is associated */
|
152
|
+
readonly fieldName: string;
|
153
|
+
|
154
|
+
/** The strategy used to create the datasource that will resolve the custom SQL statement. */
|
155
|
+
readonly strategy: SQLLambdaModelDataSourceStrategy;
|
156
|
+
|
157
|
+
/**
|
158
|
+
* Custom SQL statements to be executed to resolve this field.
|
159
|
+
*
|
160
|
+
* Note: It's overkill to make this a map: a SqlDirectiveDataSourceStrategy will only ever use at most one statement (and maybe not even
|
161
|
+
* that if the directive uses inline statements). However, to avoid having to parse the directive configuration in multiple places, we'll
|
162
|
+
* pass the entire map as specified in the CDK construct definition, and let the directive transformer use it to look up references.
|
163
|
+
*/
|
164
|
+
readonly customSqlStatements?: Record<string, string>;
|
165
|
+
}
|
166
|
+
|
167
|
+
/**
|
168
|
+
* Defines types that vend a dataSourceStrategies and optional customSqlDataSourceStrategies field. Primarily used for transformer context.
|
169
|
+
*/
|
170
|
+
export interface DataSourceStrategiesProvider {
|
171
|
+
/** Maps GraphQL model names to the ModelDataSourceStrategy used to resolve it. The key of the record is the GraphQL type name. */
|
172
|
+
dataSourceStrategies: Record<string, ModelDataSourceStrategy>;
|
173
|
+
|
174
|
+
/** Maps custom Query and Mutation fields to the ModelDataSourceStrategy used to resolve them. */
|
175
|
+
sqlDirectiveDataSourceStrategies?: SqlDirectiveDataSourceStrategy[];
|
176
|
+
}
|
177
|
+
|
178
|
+
/**
|
179
|
+
* Maps a given AWS region to the SQL Lambda layer version ARN for that region. TODO: Once we remove SQL imports from Gen1 CLI, remove this
|
180
|
+
* from the transformer interfaces package in favor of the model generator, which is the only place that needs it now that we always resolve
|
181
|
+
* the layer mapping at deploy time.
|
182
|
+
*/
|
183
|
+
export interface RDSLayerMapping {
|
184
|
+
readonly [key: string]: {
|
185
|
+
layerRegion: string;
|
186
|
+
};
|
187
|
+
}
|
188
|
+
|
189
|
+
/**
|
190
|
+
* Defines types that vend an rdsLayerMapping field. This is used solely for the Gen1 CLI import API flow, since wiring the custom resource
|
191
|
+
* provider used by the CDK isn't worth the cost. TODO: Remove this once we remove SQL imports from Gen1 CLI.
|
192
|
+
*/
|
193
|
+
export interface RDSLayerMappingProvider {
|
194
|
+
rdsLayerMapping?: RDSLayerMapping;
|
195
|
+
}
|
package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transform-host-provider.ts
CHANGED
@@ -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
|
/**
|
package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/index.ts
CHANGED
@@ -3,25 +3,20 @@ export {
|
|
3
3
|
TransformerDataSourceManagerProvider,
|
4
4
|
AppSyncDataSourceType,
|
5
5
|
DataSourceInstance,
|
6
|
-
DataSourceType,
|
7
|
-
DBType,
|
8
|
-
DataSourceProvisionStrategy,
|
9
|
-
DynamoDBProvisionStrategy,
|
10
|
-
SQLLambdaModelProvisionStrategy,
|
11
|
-
SQLDBType,
|
12
6
|
} from './transformer-datasource-provider';
|
13
7
|
export { TransformerContextOutputProvider } from './transformer-context-output-provider';
|
14
8
|
export { TransformerProviderRegistry } from './transformer-provider-registry';
|
15
9
|
export { TransformerResolverProvider, TransformerResolversManagerProvider } from './transformer-resolver-provider';
|
16
10
|
export * from './resource-resource-provider';
|
17
11
|
export {
|
18
|
-
TransformerContextProvider,
|
19
|
-
TransformerTransformSchemaStepContextProvider,
|
20
12
|
TransformerBeforeStepContextProvider,
|
13
|
+
TransformerContextMetadataProvider,
|
14
|
+
TransformerContextProvider,
|
21
15
|
TransformerPrepareStepContextProvider,
|
22
16
|
TransformerSchemaVisitStepContextProvider,
|
23
|
-
TransformerValidationStepContextProvider,
|
24
17
|
TransformerSecrets,
|
18
|
+
TransformerTransformSchemaStepContextProvider,
|
19
|
+
TransformerValidationStepContextProvider,
|
25
20
|
} from './transformer-context-provider';
|
26
21
|
export { TransformerSchemaHelperProvider } from './schema-helper-provider';
|
27
22
|
export { TransformerPreProcessContextProvider } from './transformer-preprocess-context-provider';
|