@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
@@ -4,12 +4,13 @@
|
|
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';
|
10
11
|
import { AppSyncDataSourceType } from '@aws-amplify/graphql-transformer-interfaces';
|
11
12
|
import { AppSyncFunctionConfigurationProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
12
|
-
import
|
13
|
+
import { AssetProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
13
14
|
import { AuthorizationConfig } from 'aws-cdk-lib/aws-appsync';
|
14
15
|
import { AuthorizationType } from 'aws-cdk-lib/aws-appsync';
|
15
16
|
import { CfnApiKey } from 'aws-cdk-lib/aws-appsync';
|
@@ -19,9 +20,9 @@ import { CfnResource } from 'aws-cdk-lib';
|
|
19
20
|
import { Construct } from 'constructs';
|
20
21
|
import { DataSourceInstance } from '@aws-amplify/graphql-transformer-interfaces';
|
21
22
|
import { DataSourceProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
22
|
-
import {
|
23
|
-
import {
|
24
|
-
import {
|
23
|
+
import { DataSourceStrategiesProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
24
|
+
import { DefaultDynamoDbModelDataSourceStrategy } from '@aws-amplify/graphql-transformer-interfaces';
|
25
|
+
import { DefinitionNode } from 'graphql';
|
25
26
|
import { DirectiveDefinitionNode } from 'graphql';
|
26
27
|
import { DirectiveNode } from 'graphql';
|
27
28
|
import { DocumentNode } from 'graphql/language';
|
@@ -45,6 +46,9 @@ import { InterfaceTypeExtensionNode } from 'graphql';
|
|
45
46
|
import { Location as Location_2 } from 'graphql';
|
46
47
|
import { LogConfig } from 'aws-cdk-lib/aws-appsync';
|
47
48
|
import { MappingTemplateProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
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';
|
48
52
|
import { ModelFieldMap } from '@aws-amplify/graphql-transformer-interfaces';
|
49
53
|
import { MutationFieldType } from '@aws-amplify/graphql-transformer-interfaces';
|
50
54
|
import { NamedTypeNode } from 'graphql';
|
@@ -52,19 +56,20 @@ import { NestedStackProvider } from '@aws-amplify/graphql-transformer-interfaces
|
|
52
56
|
import { ObjectTypeDefinitionNode } from 'graphql';
|
53
57
|
import { ObjectTypeExtensionNode } from 'graphql';
|
54
58
|
import { OperationTypeDefinitionNode } from 'graphql';
|
55
|
-
import type { ProvisionedConcurrencyConfig } from '@aws-amplify/graphql-transformer-interfaces';
|
56
59
|
import { QueryFieldType } from '@aws-amplify/graphql-transformer-interfaces';
|
57
60
|
import { RDSLayerMapping } from '@aws-amplify/graphql-transformer-interfaces';
|
61
|
+
import { RDSLayerMappingProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
58
62
|
import { S3MappingTemplateProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
59
63
|
import { SchemaDefinitionNode } from 'graphql';
|
64
|
+
import { SqlDirectiveDataSourceStrategy } from '@aws-amplify/graphql-transformer-interfaces';
|
65
|
+
import { SQLLambdaModelDataSourceStrategy } from '@aws-amplify/graphql-transformer-interfaces';
|
60
66
|
import { Stack } from 'aws-cdk-lib';
|
61
67
|
import { StackManagerProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
62
68
|
import { StringValueNode } from 'graphql';
|
63
69
|
import { SubscriptionFieldType } from '@aws-amplify/graphql-transformer-interfaces';
|
64
70
|
import { SynthParameters } from '@aws-amplify/graphql-transformer-interfaces';
|
65
71
|
import { TransformerAuthProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
66
|
-
import {
|
67
|
-
import { TransformerContextMetadataProvider } from '@aws-amplify/graphql-transformer-interfaces/src/transformer-context/transformer-context-provider';
|
72
|
+
import { TransformerContextMetadataProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
68
73
|
import { TransformerContextOutputProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
69
74
|
import { TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
70
75
|
import { TransformerDataSourceManagerProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
@@ -82,13 +87,12 @@ import { TransformerSecrets } from '@aws-amplify/graphql-transformer-interfaces'
|
|
82
87
|
import { TransformerTransformSchemaStepContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
83
88
|
import { TransformHostProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
84
89
|
import { TransformParameterProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
85
|
-
import
|
90
|
+
import { TransformParameters } from '@aws-amplify/graphql-transformer-interfaces';
|
86
91
|
import { TypeDefinitionNode } from 'graphql';
|
87
92
|
import { TypeNode } from 'graphql';
|
88
93
|
import { TypeSystemDefinitionNode } from 'graphql';
|
89
94
|
import { UnionTypeDefinitionNode } from 'graphql';
|
90
95
|
import { UnionTypeExtensionNode } from 'graphql';
|
91
|
-
import type { VpcConfig } from '@aws-amplify/graphql-transformer-interfaces';
|
92
96
|
|
93
97
|
// @public (undocumented)
|
94
98
|
export const APICategory = "api";
|
@@ -116,7 +120,10 @@ export const enum ConflictHandlerType {
|
|
116
120
|
}
|
117
121
|
|
118
122
|
// @public (undocumented)
|
119
|
-
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[];
|
120
127
|
|
121
128
|
// @public (undocumented)
|
122
129
|
function createSyncLambdaIAMPolicy(context: TransformerContextProvider, scope: Construct, name: string, region?: string): iam.Policy;
|
@@ -127,7 +134,13 @@ function createSyncLambdaIAMPolicy(context: TransformerContextProvider, scope: C
|
|
127
134
|
function createSyncTable(context: TransformerContext): void;
|
128
135
|
|
129
136
|
// @public (undocumented)
|
130
|
-
export const
|
137
|
+
export const DDB_AMPLIFY_MANAGED_DATASOURCE_STRATEGY: ModelDataSourceStrategy;
|
138
|
+
|
139
|
+
// @public (undocumented)
|
140
|
+
export const DDB_DB_TYPE: ModelDataSourceStrategyDbType;
|
141
|
+
|
142
|
+
// @public (undocumented)
|
143
|
+
export const DDB_DEFAULT_DATASOURCE_STRATEGY: ModelDataSourceStrategy;
|
131
144
|
|
132
145
|
// @public (undocumented)
|
133
146
|
export class DirectiveWrapper {
|
@@ -155,6 +168,9 @@ export class EnumWrapper {
|
|
155
168
|
values: string[];
|
156
169
|
}
|
157
170
|
|
171
|
+
// @public (undocumented)
|
172
|
+
export const fieldsWithSqlDirective: (obj: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode) => FieldDefinitionNode[];
|
173
|
+
|
158
174
|
// Warning: (ae-forgotten-export) The symbol "GenericFieldWrapper" needs to be exported by the entry point index.d.ts
|
159
175
|
//
|
160
176
|
// @public (undocumented)
|
@@ -184,13 +200,7 @@ export type GetArgumentsOptions = {
|
|
184
200
|
};
|
185
201
|
|
186
202
|
// @public (undocumented)
|
187
|
-
export
|
188
|
-
|
189
|
-
// @public (undocumented)
|
190
|
-
export const getDataSourceType: (type: TypeNode, ctx: TransformerContextProvider) => DBType;
|
191
|
-
|
192
|
-
// @public (undocumented)
|
193
|
-
export const getEngineFromDBType: (dbType: DBType) => ImportedRDSType;
|
203
|
+
export const getDefaultStrategyNameForDbType: (dbType: ModelDataSourceStrategySqlDbType) => string;
|
194
204
|
|
195
205
|
// Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts
|
196
206
|
//
|
@@ -198,11 +208,20 @@ export const getEngineFromDBType: (dbType: DBType) => ImportedRDSType;
|
|
198
208
|
export const getFieldNameFor: (op: Operation, typeName: string) => string;
|
199
209
|
|
200
210
|
// @public (undocumented)
|
201
|
-
export const
|
211
|
+
export const getImportedRDSTypeFromStrategyDbType: (dbType: ModelDataSourceStrategyDbType) => ImportedRDSType;
|
202
212
|
|
203
213
|
// @public (undocumented)
|
204
214
|
export const getKeySchema: (table: any, indexName?: string) => any;
|
205
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
|
+
|
206
225
|
// @public (undocumented)
|
207
226
|
export const getParameterStoreSecretPath: (secret: string, secretsKey: string, apiName: string, environmentName: string, appId: string) => string;
|
208
227
|
|
@@ -212,9 +231,18 @@ export const getPrimaryKeyFields: (type: ObjectTypeDefinitionNode) => string[];
|
|
212
231
|
// @public (undocumented)
|
213
232
|
export const getResourceName: (scope: Construct) => string | undefined;
|
214
233
|
|
234
|
+
// @public (undocumented)
|
235
|
+
export const getResourceNamesForStrategy: (strategy: SQLLambdaModelDataSourceStrategy) => SQLLambdaResourceNames;
|
236
|
+
|
237
|
+
// @public (undocumented)
|
238
|
+
export const getResourceNamesForStrategyName: (strategyName: string) => SQLLambdaResourceNames;
|
239
|
+
|
215
240
|
// @public (undocumented)
|
216
241
|
export const getSortKeyFieldNames: (type: ObjectTypeDefinitionNode) => string[];
|
217
242
|
|
243
|
+
// @public (undocumented)
|
244
|
+
export const getStrategyDbTypeFromTypeNode: (type: TypeNode, ctx: TransformerContextProvider) => ModelDataSourceStrategyDbType;
|
245
|
+
|
218
246
|
// @public (undocumented)
|
219
247
|
function getSyncConfig(ctx: TransformerTransformSchemaStepContextProvider, typeName: string): SyncConfig | undefined;
|
220
248
|
|
@@ -236,7 +264,7 @@ export class GraphQLTransform {
|
|
236
264
|
// Warning: (ae-forgotten-export) The symbol "TransformOption" needs to be exported by the entry point index.d.ts
|
237
265
|
//
|
238
266
|
// (undocumented)
|
239
|
-
transform({
|
267
|
+
transform({ assetProvider, dataSourceStrategies, nestedStackProvider, parameterProvider, rdsLayerMapping, schema, scope, sqlDirectiveDataSourceStrategies, synthParameters, }: TransformOption): void;
|
240
268
|
}
|
241
269
|
|
242
270
|
// @public (undocumented)
|
@@ -246,13 +274,7 @@ export interface GraphQLTransformOptions {
|
|
246
274
|
// (undocumented)
|
247
275
|
readonly host?: TransformHostProvider;
|
248
276
|
// (undocumented)
|
249
|
-
readonly rdsLayerMapping?: RDSLayerMapping;
|
250
|
-
// (undocumented)
|
251
277
|
readonly resolverConfig?: ResolverConfig;
|
252
|
-
// (undocumented)
|
253
|
-
readonly sqlLambdaProvisionedConcurrencyConfig?: ProvisionedConcurrencyConfig;
|
254
|
-
// (undocumented)
|
255
|
-
readonly sqlLambdaVpcConfig?: VpcConfig;
|
256
278
|
// Warning: (ae-forgotten-export) The symbol "StackMapping" needs to be exported by the entry point index.d.ts
|
257
279
|
//
|
258
280
|
// (undocumented)
|
@@ -353,16 +375,52 @@ export class InvalidTransformerError extends Error {
|
|
353
375
|
}
|
354
376
|
|
355
377
|
// @public (undocumented)
|
356
|
-
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";
|
357
395
|
|
358
396
|
// @public (undocumented)
|
359
397
|
function isLambdaSyncConfig(syncConfig: SyncConfig): syncConfig is SyncConfigLambda;
|
360
398
|
|
361
399
|
// @public (undocumented)
|
362
|
-
export const
|
400
|
+
export const isMutationNode: (obj: DefinitionNode) => obj is ObjectTypeDefinitionNode | (InterfaceTypeDefinitionNode & {
|
401
|
+
name: {
|
402
|
+
value: 'Mutation';
|
403
|
+
};
|
404
|
+
});
|
363
405
|
|
364
406
|
// @public (undocumented)
|
365
|
-
export const
|
407
|
+
export const isObjectTypeDefinitionNode: (obj: DefinitionNode) => obj is ObjectTypeDefinitionNode;
|
408
|
+
|
409
|
+
// @public (undocumented)
|
410
|
+
export const isQueryNode: (obj: DefinitionNode) => obj is ObjectTypeDefinitionNode | (InterfaceTypeDefinitionNode & {
|
411
|
+
name: {
|
412
|
+
value: 'Query';
|
413
|
+
};
|
414
|
+
});
|
415
|
+
|
416
|
+
// @public (undocumented)
|
417
|
+
export const isSqlDbType: (dbType: ModelDataSourceStrategyDbType) => dbType is ModelDataSourceStrategySqlDbType;
|
418
|
+
|
419
|
+
// @public (undocumented)
|
420
|
+
export const isSqlModel: (ctx: DataSourceStrategiesProvider, typename: string) => boolean;
|
421
|
+
|
422
|
+
// @public (undocumented)
|
423
|
+
export const isSqlStrategy: (strategy: ModelDataSourceStrategy) => strategy is SQLLambdaModelDataSourceStrategy;
|
366
424
|
|
367
425
|
// @public (undocumented)
|
368
426
|
export class MappingTemplate {
|
@@ -377,7 +435,10 @@ export class MappingTemplate {
|
|
377
435
|
}
|
378
436
|
|
379
437
|
// @public (undocumented)
|
380
|
-
export const MYSQL_DB_TYPE:
|
438
|
+
export const MYSQL_DB_TYPE: ModelDataSourceStrategySqlDbType;
|
439
|
+
|
440
|
+
// @public (undocumented)
|
441
|
+
export const normalizeDbType: (candidate: string) => ModelDataSourceStrategyDbType;
|
381
442
|
|
382
443
|
// @public (undocumented)
|
383
444
|
export class ObjectDefinitionWrapper {
|
@@ -403,7 +464,7 @@ export class ObjectDefinitionWrapper {
|
|
403
464
|
}
|
404
465
|
|
405
466
|
// @public (undocumented)
|
406
|
-
export const POSTGRES_DB_TYPE:
|
467
|
+
export const POSTGRES_DB_TYPE: ModelDataSourceStrategySqlDbType;
|
407
468
|
|
408
469
|
// @public (undocumented)
|
409
470
|
export type RDSConnectionSecrets = TransformerSecrets & {
|
@@ -442,6 +503,42 @@ export type SetResourceNameProps = {
|
|
442
503
|
// @public (undocumented)
|
443
504
|
export const SQL_SCHEMA_FILE_NAME = "schema.sql.graphql";
|
444
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
|
+
|
445
542
|
// @public (undocumented)
|
446
543
|
export class StackManager implements StackManagerProvider {
|
447
544
|
// Warning: (ae-forgotten-export) The symbol "ResourceToStackMap" needs to be exported by the entry point index.d.ts
|
@@ -3,6 +3,19 @@
|
|
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
|
+
|
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)
|
14
|
+
|
15
|
+
### Bug Fixes
|
16
|
+
|
17
|
+
- Allow custom SQL statements without model declarations ([#2087](https://github.com/aws-amplify/amplify-category-api/issues/2087)) ([ea5b26c](https://github.com/aws-amplify/amplify-category-api/commit/ea5b26cd554f5c74b6431cbad6ccf60ab556478f))
|
18
|
+
|
6
19
|
## [2.3.2](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-transformer-core@2.3.1...@aws-amplify/graphql-transformer-core@2.3.2) (2023-11-18)
|
7
20
|
|
8
21
|
### 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 {
|
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":[],"mappings":"AAGA,OAAO,EACL,6BAA6B,EAC7B,yCAAyC,EACzC,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACvB,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,UAAU,EACV,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,EACnB,iCAAiC,EACjC,+BAA+B,EAC/B,oCAAoC,EACpC,YAAY,EACZ,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EACnB,eAAe,EACf,2BAA2B,EAC3B,+BAA+B,EAC/B,oBAAoB,EACpB,6BAA6B,EAC7B,QAAQ,EACR,wCAAwC,EACxC,oBAAoB,EACpB,wCAAwC,EACxC,eAAe,EACf,cAAc,EACd,cAAc,EACd,0BAA0B,EAC1B,WAAW,EACX,WAAW,EACX,UAAU,EACV,aAAa,EACb,eAAe,EACf,eAAe,EACf,sBAAsB,GACvB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC5B,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EACL,uCAAuC,EACvC,WAAW,EACX,+BAA+B,EAC/B,sBAAsB,EACtB,wBAAwB,EACxB,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,37 +14,53 @@ 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");
|
27
30
|
Object.defineProperty(exports, "ConflictHandlerType", { enumerable: true, get: function () { return index_1.ConflictHandlerType; } });
|
28
31
|
var utils_1 = require("./utils");
|
29
|
-
Object.defineProperty(exports, "
|
30
|
-
Object.defineProperty(exports, "getTable", { enumerable: true, get: function () { return utils_1.getTable; } });
|
31
|
-
Object.defineProperty(exports, "getKeySchema", { enumerable: true, get: function () { return utils_1.getKeySchema; } });
|
32
|
-
Object.defineProperty(exports, "getSortKeyFieldNames", { enumerable: true, get: function () { return utils_1.getSortKeyFieldNames; } });
|
33
|
-
Object.defineProperty(exports, "getParameterStoreSecretPath", { enumerable: true, get: function () { return utils_1.getParameterStoreSecretPath; } });
|
32
|
+
Object.defineProperty(exports, "APICategory", { enumerable: true, get: function () { return utils_1.APICategory; } });
|
34
33
|
Object.defineProperty(exports, "collectDirectives", { enumerable: true, get: function () { return utils_1.collectDirectives; } });
|
35
34
|
Object.defineProperty(exports, "collectDirectivesByTypeNames", { enumerable: true, get: function () { return utils_1.collectDirectivesByTypeNames; } });
|
36
35
|
Object.defineProperty(exports, "DirectiveWrapper", { enumerable: true, get: function () { return utils_1.DirectiveWrapper; } });
|
37
|
-
Object.defineProperty(exports, "
|
36
|
+
Object.defineProperty(exports, "fieldsWithSqlDirective", { enumerable: true, get: function () { return utils_1.fieldsWithSqlDirective; } });
|
37
|
+
Object.defineProperty(exports, "generateGetArgumentsInput", { enumerable: true, get: function () { return utils_1.generateGetArgumentsInput; } });
|
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; } });
|
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; } });
|
43
|
+
Object.defineProperty(exports, "getParameterStoreSecretPath", { enumerable: true, get: function () { return utils_1.getParameterStoreSecretPath; } });
|
38
44
|
Object.defineProperty(exports, "getPrimaryKeyFields", { enumerable: true, get: function () { return utils_1.getPrimaryKeyFields; } });
|
39
|
-
Object.defineProperty(exports, "getDataSourceType", { enumerable: true, get: function () { return utils_1.getDataSourceType; } });
|
40
|
-
Object.defineProperty(exports, "setResourceName", { enumerable: true, get: function () { return utils_1.setResourceName; } });
|
41
45
|
Object.defineProperty(exports, "getResourceName", { enumerable: true, get: function () { return utils_1.getResourceName; } });
|
42
|
-
Object.defineProperty(exports, "
|
43
|
-
Object.defineProperty(exports, "
|
44
|
-
Object.defineProperty(exports, "
|
45
|
-
Object.defineProperty(exports, "
|
46
|
-
Object.defineProperty(exports, "
|
47
|
-
Object.defineProperty(exports, "
|
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; } });
|
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; } });
|
50
|
+
Object.defineProperty(exports, "getTable", { enumerable: true, get: function () { return utils_1.getTable; } });
|
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; } });
|
56
|
+
Object.defineProperty(exports, "isMutationNode", { enumerable: true, get: function () { return utils_1.isMutationNode; } });
|
57
|
+
Object.defineProperty(exports, "isObjectTypeDefinitionNode", { enumerable: true, get: function () { return utils_1.isObjectTypeDefinitionNode; } });
|
58
|
+
Object.defineProperty(exports, "isQueryNode", { enumerable: true, get: function () { return utils_1.isQueryNode; } });
|
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; } });
|
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; } });
|
63
|
+
Object.defineProperty(exports, "setResourceName", { enumerable: true, get: function () { return utils_1.setResourceName; } });
|
48
64
|
__exportStar(require("./utils/operation-names"), exports);
|
49
65
|
__exportStar(require("./errors"), exports);
|
50
66
|
var transformer_plugin_base_1 = require("./transformation/transformer-plugin-base");
|
@@ -56,7 +72,9 @@ var transformer_context_1 = require("./transformer-context");
|
|
56
72
|
Object.defineProperty(exports, "TransformerResolver", { enumerable: true, get: function () { return transformer_context_1.TransformerResolver; } });
|
57
73
|
Object.defineProperty(exports, "StackManager", { enumerable: true, get: function () { return transformer_context_1.StackManager; } });
|
58
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; } });
|
59
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; } });
|
60
78
|
Object.defineProperty(exports, "ImportedRDSType", { enumerable: true, get: function () { return types_1.ImportedRDSType; } });
|
61
79
|
Object.defineProperty(exports, "MYSQL_DB_TYPE", { enumerable: true, get: function () { return types_1.MYSQL_DB_TYPE; } });
|
62
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":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,qCAAgC;AAChC,4DAAwE;AAExE,mDAO0B;AANxB,+HAAA,6BAA6B,OAAA;AAC7B,2IAAA,yCAAyC,OAAA;AACzC,mHAAA,iBAAiB,OAAA;AACjB,kHAAA,gBAAgB,OAAA;AAEhB,2GAAA,SAAS,OAAA;AAGX,0DAAkE;AAAzD,iHAAA,mBAAmB,OAAA;AAC5B,wCASwB;AAPtB,4GAAA,mBAAmB,OAAA;AAQrB,iCAmCiB;AAlCf,oGAAA,WAAW,OAAA;AACX,0GAAA,iBAAiB,OAAA;AACjB,qHAAA,4BAA4B,OAAA;AAC5B,yGAAA,gBAAgB,OAAA;AAChB,+GAAA,sBAAsB,OAAA;AACtB,kHAAA,yBAAyB,OAAA;AAEzB,0HAAA,iCAAiC,OAAA;AACjC,wHAAA,+BAA+B,OAAA;AAC/B,6HAAA,oCAAoC,OAAA;AACpC,qGAAA,YAAY,OAAA;AACZ,mHAAA,0BAA0B,OAAA;AAC1B,oHAAA,2BAA2B,OAAA;AAC3B,4GAAA,mBAAmB,OAAA;AACnB,wGAAA,eAAe,OAAA;AACf,oHAAA,2BAA2B,OAAA;AAC3B,wHAAA,+BAA+B,OAAA;AAC/B,6GAAA,oBAAoB,OAAA;AACpB,sHAAA,6BAA6B,OAAA;AAC7B,iGAAA,QAAQ,OAAA;AACR,iIAAA,wCAAwC,OAAA;AACxC,6GAAA,oBAAoB,OAAA;AACpB,iIAAA,wCAAwC,OAAA;AACxC,wGAAA,eAAe,OAAA;AACf,uGAAA,cAAc,OAAA;AACd,uGAAA,cAAc,OAAA;AACd,mHAAA,0BAA0B,OAAA;AAC1B,oGAAA,WAAW,OAAA;AACX,oGAAA,WAAW,OAAA;AACX,mGAAA,UAAU,OAAA;AACV,sGAAA,aAAa,OAAA;AACb,wGAAA,eAAe,OAAA;AACf,wGAAA,eAAe,OAAA;AAIjB,0DAAwC;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":"AAAA,OAAO,EACL,wBAAwB,EAExB,yBAAyB,EACzB,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,eAAe,
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/transformation/transform.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EAExB,yBAAyB,EACzB,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,eAAe,EAChB,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACnB,4BAA4B,EAC5B,uBAAuB,EACxB,MAAM,6CAA6C,CAAC;AAmBrD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAMlE,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA4B1C,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,YAAY,EAAE,yBAAyB,EAAE,CAAC;IAInD,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IAErC,QAAQ,CAAC,UAAU,CAAC,EAAE,wBAAwB,CAAC;IAC/C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC5D,QAAQ,CAAC,IAAI,CAAC,EAAE,qBAAqB,CAAC;IACtC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,CAAC;IAC9D,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;CAC1C;AAED,MAAM,WAAW,eAAgB,SAAQ,4BAA4B,EAAE,uBAAuB;IAC5F,KAAK,EAAE,SAAS,CAAC;IACjB,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;IAC/C,aAAa,EAAE,aAAa,CAAC;IAC7B,eAAe,EAAE,eAAe,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,YAAY,GAAG;IAAE,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAE5D,qBAAa,gBAAgB;IAoBf,OAAO,CAAC,QAAQ,CAAC,OAAO;IAnBpC,OAAO,CAAC,YAAY,CAA8B;IAElD,OAAO,CAAC,qBAAqB,CAAe;IAE5C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA2B;IAEtD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAiB;IAEjD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAoC;IAErE,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAsB;IAK1D,OAAO,CAAC,mBAAmB,CAAgC;IAE3D,OAAO,CAAC,IAAI,CAAmB;gBAEF,OAAO,EAAE,uBAAuB;IAyCtD,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,YAAY;IAwBpD,SAAS,CAAC,EACf,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,MAAM,EACN,KAAK,EACL,gCAAgC,EAChC,eAAe,GAChB,EAAE,eAAe,GAAG,IAAI;IAwIzB,SAAS,CAAC,kBAAkB,CAC1B,YAAY,EAAE,oBAAoB,EAClC,eAAe,EAAE,eAAe,EAChC,MAAM,EAAE,iBAAiB,EACzB,mBAAmB,EAAE,mBAAmB,GACvC,UAAU;IAgEb,OAAO,CAAC,gBAAgB;IAoBxB,OAAO,CAAC,eAAe;IA+BvB,OAAO,CAAC,cAAc;IAgCtB,OAAO,CAAC,iBAAiB;IA8BzB,OAAO,CAAC,kBAAkB;IA+B1B,OAAO,CAAC,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,11 +87,24 @@ class GraphQLTransform {
|
|
89
87
|
};
|
90
88
|
}, context).inputDocument;
|
91
89
|
}
|
92
|
-
transform({
|
93
|
-
var _a, _b;
|
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
|
-
const context = new transformer_context_1.TransformerContext(
|
93
|
+
const context = new transformer_context_1.TransformerContext({
|
94
|
+
assetProvider,
|
95
|
+
authConfig: this.authConfig,
|
96
|
+
dataSourceStrategies: dataSourceStrategies,
|
97
|
+
inputDocument: parsedDocument,
|
98
|
+
nestedStackProvider,
|
99
|
+
parameterProvider,
|
100
|
+
rdsLayerMapping,
|
101
|
+
resolverConfig: this.resolverConfig,
|
102
|
+
scope,
|
103
|
+
sqlDirectiveDataSourceStrategies: sqlDirectiveDataSourceStrategies !== null && sqlDirectiveDataSourceStrategies !== void 0 ? sqlDirectiveDataSourceStrategies : [],
|
104
|
+
stackMapping: this.stackMappingOverrides,
|
105
|
+
synthParameters,
|
106
|
+
transformParameters: this.transformParameters,
|
107
|
+
});
|
97
108
|
const validDirectiveNameMap = this.transformers.reduce((acc, t) => ({ ...acc, [t.directive.name.value]: true }), {
|
98
109
|
aws_subscribe: true,
|
99
110
|
aws_auth: true,
|