@aws-amplify/graphql-api-construct 1.7.0-iam-auth-with-identityPool-provider-1.0 → 1.7.1-gen2-release.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.jsii +148 -36
- package/API.md +13 -1
- package/CHANGELOG.md +6 -2
- package/README.md +75 -17
- package/lib/amplify-dynamodb-table-wrapper.js +1 -1
- package/lib/amplify-graphql-api.js +1 -1
- package/lib/amplify-graphql-definition.js +1 -1
- package/lib/internal/authorization-modes.d.ts +10 -0
- package/lib/internal/authorization-modes.js +18 -8
- package/lib/internal/codegen-assets.js +10 -1
- package/lib/internal/data-source-config.js +37 -4
- package/lib/model-datasource-strategy-types.d.ts +25 -1
- package/lib/model-datasource-strategy-types.js +1 -1
- package/lib/sql-model-datasource-strategy.d.ts +13 -1
- package/lib/sql-model-datasource-strategy.js +26 -4
- package/node_modules/@aws-amplify/graphql-auth-transformer/API.md +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +5 -3
- 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 +4 -5
- 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/definitions.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.js +2 -39
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/common.d.ts +4 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/common.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/common.js +12 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/common.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.js +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.js +16 -13
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.d.ts +8 -2
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.js +10 -14
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/index.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/index.js +2 -2
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.create.js +2 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.create.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.delete.js +2 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.delete.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.update.js +2 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.update.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/query.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/query.js +15 -4
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/query.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/search.js +2 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/search.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/subscriptions.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/subscriptions.js +8 -2
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/subscriptions.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.js +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.js +10 -19
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/vtl-generator.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/vtl-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +14 -13
- package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +5 -1
- 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 -5
- 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 +9 -8
- package/node_modules/@aws-amplify/graphql-directives/API.md +158 -0
- package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +14 -0
- package/node_modules/@aws-amplify/graphql-directives/Readme.md +19 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-api-key.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-api-key.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-api-key.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-api-key.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-auth.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-auth.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-auth.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-auth.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-cognito-user-pools.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-cognito-user-pools.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-cognito-user-pools.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-cognito-user-pools.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-iam.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-iam.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-iam.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-iam.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-lambda.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-lambda.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-lambda.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-lambda.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-oidc.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-oidc.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-oidc.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-oidc.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-subscribe.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-subscribe.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-subscribe.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-subscribe.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/index.d.ts +8 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/index.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/index.js +18 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/index.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.js +50 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/default.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/default.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/default.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/default.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/deprecated.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/deprecated.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/deprecated.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/deprecated.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/directive.d.ts +8 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/directive.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/directive.js +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/directive.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/function.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/function.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/function.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/function.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-many.d.ts +6 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-many.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-many.js +16 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-many.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-one.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-one.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-one.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-one.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/http.d.ts +7 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/http.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/http.js +28 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/http.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index-directive.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index-directive.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index-directive.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index-directive.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.d.ts +21 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.js +54 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/many-to-many.d.ts +6 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/many-to-many.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/many-to-many.js +16 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/many-to-many.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/maps-to.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/maps-to.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/maps-to.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/maps-to.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/model.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/model.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/model.js +43 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/model.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/predictions.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/predictions.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/predictions.js +20 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/predictions.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/primary-key.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/primary-key.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/primary-key.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/primary-key.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/refers-to.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/refers-to.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/refers-to.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/refers-to.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/searchable.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/searchable.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/searchable.js +17 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/searchable.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/sql.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/sql.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/sql.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/sql.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/auth.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/auth.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/auth.js +85 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/auth.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/connection.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/connection.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/connection.js +21 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/connection.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/function.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/function.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/function.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/function.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/http.d.ts +7 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/http.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/http.js +28 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/http.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/index.d.ts +10 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/index.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/index.js +22 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/index.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/key.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/key.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/key.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/key.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/model.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/model.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/model.js +43 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/model.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/predictions.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/predictions.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/predictions.js +20 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/predictions.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/searchable.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/searchable.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/searchable.js +17 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/searchable.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/versioned.d.ts +7 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/versioned.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/versioned.js +17 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/versioned.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/index.d.ts +7 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/index.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/index.js +60 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/index.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/package.json +66 -0
- package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +5 -1
- 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 +2 -4
- 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 +8 -7
- package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-http-transformer/lib/graphql-http-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-http-transformer/lib/graphql-http-transformer.js +2 -15
- package/node_modules/@aws-amplify/graphql-http-transformer/lib/graphql-http-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +8 -7
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-index-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-index-transformer.js +5 -8
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-index-transformer.js.map +1 -1
- 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 -7
- 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 +1 -1
- 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 +19 -10
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/resolvers.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/schema.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/schema.js +13 -2
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/schema.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/package.json +9 -8
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +5 -1
- 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 +6 -9
- 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 +9 -12
- 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 +12 -11
- package/node_modules/@aws-amplify/graphql-model-transformer/API.md +2 -2
- package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +7 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.d.ts +0 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.js +1 -8
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.d.ts +0 -1
- 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 +3 -44
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-notification-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-patching-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.js +8 -7
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.d.ts +5 -1
- 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 +71 -26
- 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/model-resource-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.js +3 -3
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.js.map +1 -1
- 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 +21 -7
- 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 +8 -7
- package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.js +2 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/utils/constants.d.ts +0 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/utils/constants.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/utils/constants.js +1 -10
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/utils/constants.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +8 -7
- package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +7 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.d.ts +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.js +37 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-references-transformer.d.ts +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-references-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-references-transformer.js +36 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-references-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.d.ts +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.js +30 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.d.ts +5 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.js +31 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/data-source-based-directive-transformer.d.ts +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/data-source-based-directive-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/data-source-based-directive-transformer.js +3 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/data-source-based-directive-transformer.js.map +1 -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 +17 -52
- 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 +16 -46
- 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.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.js +15 -38
- 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 +13 -17
- 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/has-many/has-many-directive-ddb-fields-transformer.d.ts +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.js +36 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.d.ts +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.js +37 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.d.ts +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.js +30 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.d.ts +5 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.js +31 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.d.ts +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.js +34 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.d.ts +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.js +37 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.d.ts +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.js +30 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.d.ts +5 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.js +31 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.d.ts +3 -2
- 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 +6 -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/ddb-references-generator.d.ts +9 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-references-generator.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-references-generator.js +172 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-references-generator.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator.d.ts +2 -2
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolvers.d.ts +2 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolvers.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolvers.js +72 -17
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolvers.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/schema.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/schema.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/schema.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/types.d.ts +5 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/types.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.d.ts +2 -1
- 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 +7 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +10 -9
- package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/generate-resolver-vtl.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/generate-resolver-vtl.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/generate-resolver-vtl.js +20 -9
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/generate-resolver-vtl.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.js +16 -9
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.js.map +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 +9 -8
- package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +5 -1
- 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 +19 -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 +9 -8
- package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +7 -1
- 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.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer/package.json +16 -16
- package/node_modules/@aws-amplify/graphql-transformer/src/graphql-transformer.ts +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/API.md +3 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.d.ts +1 -1
- 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 +3 -2
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/validation.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/validation.js +11 -12
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/validation.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js +8 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/package.json +5 -4
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +28 -2
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +7 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts +12 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.js +22 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transformer-context-provider.d.ts +1 -1
- 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/package.json +2 -2
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/model-datasource/types.ts +76 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/transformer-context-provider.ts +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
- package/node_modules/graphql-mapping-template/CHANGELOG.md +0 -4
- package/node_modules/graphql-mapping-template/package.json +2 -3
- package/node_modules/graphql-transformer-common/API.md +13 -0
- package/node_modules/graphql-transformer-common/CHANGELOG.md +7 -1
- package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.d.ts +13 -0
- package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.d.ts.map +1 -1
- package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.js +13 -0
- package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.js.map +1 -1
- package/node_modules/graphql-transformer-common/package.json +3 -3
- package/package.json +21 -19
- package/src/internal/authorization-modes.ts +18 -8
- package/src/internal/codegen-assets.ts +11 -2
- package/src/internal/data-source-config.ts +42 -9
- package/src/model-datasource-strategy-types.ts +33 -1
- package/src/sql-model-datasource-strategy.ts +32 -1
- /package/node_modules/{graphql-mapping-template → @aws-amplify/graphql-directives}/LICENSE +0 -0
@@ -3,10 +3,6 @@
|
|
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
|
-
## [4.20.16-iam-auth-with-identityPool-provider-1.0](https://github.com/aws-amplify/amplify-category-api/compare/graphql-mapping-template@4.20.15...graphql-mapping-template@4.20.16-iam-auth-with-identityPool-provider-1.0) (2024-03-15)
|
7
|
-
|
8
|
-
**Note:** Version bump only for package graphql-mapping-template
|
9
|
-
|
10
6
|
## [4.20.15](https://github.com/aws-amplify/amplify-category-api/compare/graphql-mapping-template@4.20.14...graphql-mapping-template@4.20.15) (2024-02-28)
|
11
7
|
|
12
8
|
**Note:** Version bump only for package graphql-mapping-template
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "graphql-mapping-template",
|
3
|
-
"version": "4.20.
|
3
|
+
"version": "4.20.15",
|
4
4
|
"description": "An AST wrapper around AWS AppSync resolvers",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -57,6 +57,5 @@
|
|
57
57
|
"coveragePathIgnorePatterns": [
|
58
58
|
"/__tests__/"
|
59
59
|
]
|
60
|
-
}
|
61
|
-
"gitHead": "dafa4bb5ea5cec5dc90b722bf138064897f4f24a"
|
60
|
+
}
|
62
61
|
}
|
@@ -503,6 +503,8 @@ export const transformedArgsRef: ReferenceNode;
|
|
503
503
|
// @public (undocumented)
|
504
504
|
export const TYPESCRIPT_DATA_SCHEMA_CONSTANTS: {
|
505
505
|
SCHEMA_PACKAGE: string;
|
506
|
+
SCHEMA_PACKAGE_INTERNALS: string;
|
507
|
+
BACKEND_PACKAGE: string;
|
506
508
|
MODEL_METHOD: string;
|
507
509
|
SCHEMA_METHOD: string;
|
508
510
|
IDENTIFIER_METHOD: string;
|
@@ -512,6 +514,17 @@ export const TYPESCRIPT_DATA_SCHEMA_CONSTANTS: {
|
|
512
514
|
ENUM_METHOD: string;
|
513
515
|
REFERENCE_A: string;
|
514
516
|
EXPORT_VARIABLE_NAME: string;
|
517
|
+
INTERNALS_CONFIGURE_METHOD: string;
|
518
|
+
BACKEND_SECRET_METHOD: string;
|
519
|
+
PROPERTY_VPC: string;
|
520
|
+
PROPERTY_VPC_ID: string;
|
521
|
+
PROPERTY_SECURITY_GROUP_IDS: string;
|
522
|
+
PROPERTY_AZ_CONFIG: string;
|
523
|
+
PROPERTY_SUBNET_ID: string;
|
524
|
+
PROPERTY_AZ: string;
|
525
|
+
PROPERTY_DATABASE: string;
|
526
|
+
PROPERTY_CONNECTION_URI: string;
|
527
|
+
PROPERTY_ENGINE: string;
|
515
528
|
};
|
516
529
|
|
517
530
|
// @public (undocumented)
|
@@ -3,10 +3,16 @@
|
|
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
|
-
## [4.
|
6
|
+
## [4.29.1-gen2-release.0](https://github.com/aws-amplify/amplify-category-api/compare/graphql-transformer-common@4.29.0...graphql-transformer-common@4.29.1-gen2-release.0) (2024-03-29)
|
7
7
|
|
8
8
|
**Note:** Version bump only for package graphql-transformer-common
|
9
9
|
|
10
|
+
# [4.29.0](https://github.com/aws-amplify/amplify-category-api/compare/graphql-transformer-common@4.28.1...graphql-transformer-common@4.29.0) (2024-03-28)
|
11
|
+
|
12
|
+
### Features
|
13
|
+
|
14
|
+
- **api:** auto detect vpc configuration on generate typescript database schema ([#2376](https://github.com/aws-amplify/amplify-category-api/issues/2376)) ([ef6f53c](https://github.com/aws-amplify/amplify-category-api/commit/ef6f53c04bbcc50921bf20a937d1332d4597a3fa))
|
15
|
+
|
10
16
|
## [4.28.1](https://github.com/aws-amplify/amplify-category-api/compare/graphql-transformer-common@4.28.0...graphql-transformer-common@4.28.1) (2024-02-28)
|
11
17
|
|
12
18
|
**Note:** Version bump only for package graphql-transformer-common
|
@@ -1,5 +1,7 @@
|
|
1
1
|
export declare const TYPESCRIPT_DATA_SCHEMA_CONSTANTS: {
|
2
2
|
SCHEMA_PACKAGE: string;
|
3
|
+
SCHEMA_PACKAGE_INTERNALS: string;
|
4
|
+
BACKEND_PACKAGE: string;
|
3
5
|
MODEL_METHOD: string;
|
4
6
|
SCHEMA_METHOD: string;
|
5
7
|
IDENTIFIER_METHOD: string;
|
@@ -9,5 +11,16 @@ export declare const TYPESCRIPT_DATA_SCHEMA_CONSTANTS: {
|
|
9
11
|
ENUM_METHOD: string;
|
10
12
|
REFERENCE_A: string;
|
11
13
|
EXPORT_VARIABLE_NAME: string;
|
14
|
+
INTERNALS_CONFIGURE_METHOD: string;
|
15
|
+
BACKEND_SECRET_METHOD: string;
|
16
|
+
PROPERTY_VPC: string;
|
17
|
+
PROPERTY_VPC_ID: string;
|
18
|
+
PROPERTY_SECURITY_GROUP_IDS: string;
|
19
|
+
PROPERTY_AZ_CONFIG: string;
|
20
|
+
PROPERTY_SUBNET_ID: string;
|
21
|
+
PROPERTY_AZ: string;
|
22
|
+
PROPERTY_DATABASE: string;
|
23
|
+
PROPERTY_CONNECTION_URI: string;
|
24
|
+
PROPERTY_ENGINE: string;
|
12
25
|
};
|
13
26
|
//# sourceMappingURL=TypescriptSchemaConstants.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TypescriptSchemaConstants.d.ts","sourceRoot":"","sources":["../src/TypescriptSchemaConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC
|
1
|
+
{"version":3,"file":"TypescriptSchemaConstants.d.ts","sourceRoot":"","sources":["../src/TypescriptSchemaConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;CAwB5C,CAAC"}
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TYPESCRIPT_DATA_SCHEMA_CONSTANTS = void 0;
|
4
4
|
exports.TYPESCRIPT_DATA_SCHEMA_CONSTANTS = {
|
5
5
|
SCHEMA_PACKAGE: '@aws-amplify/data-schema',
|
6
|
+
SCHEMA_PACKAGE_INTERNALS: '@aws-amplify/data-schema/internals',
|
7
|
+
BACKEND_PACKAGE: '@aws-amplify/backend',
|
6
8
|
MODEL_METHOD: 'model',
|
7
9
|
SCHEMA_METHOD: 'schema',
|
8
10
|
IDENTIFIER_METHOD: 'identifier',
|
@@ -12,5 +14,16 @@ exports.TYPESCRIPT_DATA_SCHEMA_CONSTANTS = {
|
|
12
14
|
ENUM_METHOD: 'enum',
|
13
15
|
REFERENCE_A: 'a',
|
14
16
|
EXPORT_VARIABLE_NAME: 'schema',
|
17
|
+
INTERNALS_CONFIGURE_METHOD: 'configure',
|
18
|
+
BACKEND_SECRET_METHOD: 'secret',
|
19
|
+
PROPERTY_VPC: 'vpcConfig',
|
20
|
+
PROPERTY_VPC_ID: 'vpcId',
|
21
|
+
PROPERTY_SECURITY_GROUP_IDS: 'securityGroupIds',
|
22
|
+
PROPERTY_AZ_CONFIG: 'subnetAvailabilityZones',
|
23
|
+
PROPERTY_SUBNET_ID: 'subnetId',
|
24
|
+
PROPERTY_AZ: 'availabilityZone',
|
25
|
+
PROPERTY_DATABASE: 'database',
|
26
|
+
PROPERTY_CONNECTION_URI: 'connectionUri',
|
27
|
+
PROPERTY_ENGINE: 'engine',
|
15
28
|
};
|
16
29
|
//# sourceMappingURL=TypescriptSchemaConstants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TypescriptSchemaConstants.js","sourceRoot":"","sources":["../src/TypescriptSchemaConstants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gCAAgC,GAAG;IAC9C,cAAc,EAAE,0BAA0B;IAC1C,YAAY,EAAE,OAAO;IACrB,aAAa,EAAE,QAAQ;IACvB,iBAAiB,EAAE,YAAY;IAC/B,YAAY,EAAE,OAAO;IACrB,eAAe,EAAE,UAAU;IAC3B,aAAa,EAAE,QAAQ;IACvB,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,GAAG;IAChB,oBAAoB,EAAE,QAAQ;
|
1
|
+
{"version":3,"file":"TypescriptSchemaConstants.js","sourceRoot":"","sources":["../src/TypescriptSchemaConstants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gCAAgC,GAAG;IAC9C,cAAc,EAAE,0BAA0B;IAC1C,wBAAwB,EAAE,oCAAoC;IAC9D,eAAe,EAAE,sBAAsB;IACvC,YAAY,EAAE,OAAO;IACrB,aAAa,EAAE,QAAQ;IACvB,iBAAiB,EAAE,YAAY;IAC/B,YAAY,EAAE,OAAO;IACrB,eAAe,EAAE,UAAU;IAC3B,aAAa,EAAE,QAAQ;IACvB,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,GAAG;IAChB,oBAAoB,EAAE,QAAQ;IAC9B,0BAA0B,EAAE,WAAW;IACvC,qBAAqB,EAAE,QAAQ;IAC/B,YAAY,EAAE,WAAW;IACzB,eAAe,EAAE,OAAO;IACxB,2BAA2B,EAAE,kBAAkB;IAC/C,kBAAkB,EAAE,yBAAyB;IAC7C,kBAAkB,EAAE,UAAU;IAC9B,WAAW,EAAE,kBAAkB;IAC/B,iBAAiB,EAAE,UAAU;IAC7B,uBAAuB,EAAE,eAAe;IACxC,eAAe,EAAE,QAAQ;CAC1B,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "graphql-transformer-common",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.29.1-gen2-release.0",
|
4
4
|
"description": "Common code and constants for AppSync Transformers",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -25,7 +25,7 @@
|
|
25
25
|
},
|
26
26
|
"dependencies": {
|
27
27
|
"graphql": "^15.5.0",
|
28
|
-
"graphql-mapping-template": "4.20.
|
28
|
+
"graphql-mapping-template": "4.20.15",
|
29
29
|
"md5": "^2.2.1",
|
30
30
|
"pluralize": "8.0.0"
|
31
31
|
},
|
@@ -66,5 +66,5 @@
|
|
66
66
|
"/__tests__/"
|
67
67
|
]
|
68
68
|
},
|
69
|
-
"gitHead": "
|
69
|
+
"gitHead": "a550843921e81b923214a9038b0725ac5e6b2b67"
|
70
70
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-amplify/graphql-api-construct",
|
3
|
-
"version": "1.7.
|
3
|
+
"version": "1.7.1-gen2-release.0",
|
4
4
|
"description": "AppSync GraphQL Api Construct using Amplify GraphQL Transformer.",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -38,6 +38,7 @@
|
|
38
38
|
"@aws-amplify/backend-output-storage",
|
39
39
|
"@aws-amplify/graphql-auth-transformer",
|
40
40
|
"@aws-amplify/graphql-default-value-transformer",
|
41
|
+
"@aws-amplify/graphql-directives",
|
41
42
|
"@aws-amplify/graphql-function-transformer",
|
42
43
|
"@aws-amplify/graphql-http-transformer",
|
43
44
|
"@aws-amplify/graphql-index-transformer",
|
@@ -75,20 +76,21 @@
|
|
75
76
|
"dependencies": {
|
76
77
|
"@aws-amplify/backend-output-schemas": "^0.4.0",
|
77
78
|
"@aws-amplify/backend-output-storage": "^0.2.2",
|
78
|
-
"@aws-amplify/graphql-auth-transformer": "3.
|
79
|
-
"@aws-amplify/graphql-default-value-transformer": "2.3.
|
80
|
-
"@aws-amplify/graphql-
|
81
|
-
"@aws-amplify/graphql-
|
82
|
-
"@aws-amplify/graphql-
|
83
|
-
"@aws-amplify/graphql-
|
84
|
-
"@aws-amplify/graphql-
|
85
|
-
"@aws-amplify/graphql-
|
86
|
-
"@aws-amplify/graphql-
|
87
|
-
"@aws-amplify/graphql-
|
88
|
-
"@aws-amplify/graphql-
|
89
|
-
"@aws-amplify/graphql-transformer": "
|
90
|
-
"@aws-amplify/graphql-transformer
|
91
|
-
"@aws-amplify/graphql-transformer-
|
79
|
+
"@aws-amplify/graphql-auth-transformer": "3.4.3-gen2-release.0",
|
80
|
+
"@aws-amplify/graphql-default-value-transformer": "2.3.3-gen2-release.0",
|
81
|
+
"@aws-amplify/graphql-directives": "1.1.0-gen2-release.0",
|
82
|
+
"@aws-amplify/graphql-function-transformer": "2.1.20-gen2-release.0",
|
83
|
+
"@aws-amplify/graphql-http-transformer": "2.1.20-gen2-release.0",
|
84
|
+
"@aws-amplify/graphql-index-transformer": "2.3.9-gen2-release.0",
|
85
|
+
"@aws-amplify/graphql-maps-to-transformer": "3.4.10-gen2-release.0",
|
86
|
+
"@aws-amplify/graphql-model-transformer": "2.7.1-gen2-release.0",
|
87
|
+
"@aws-amplify/graphql-predictions-transformer": "2.1.20-gen2-release.0",
|
88
|
+
"@aws-amplify/graphql-relational-transformer": "2.5.0-gen2-release.0",
|
89
|
+
"@aws-amplify/graphql-searchable-transformer": "2.6.3-gen2-release.0",
|
90
|
+
"@aws-amplify/graphql-sql-transformer": "0.2.9-gen2-release.0",
|
91
|
+
"@aws-amplify/graphql-transformer": "1.4.1-gen2-release.0",
|
92
|
+
"@aws-amplify/graphql-transformer-core": "2.5.2-gen2-release.0",
|
93
|
+
"@aws-amplify/graphql-transformer-interfaces": "3.5.1-gen2-release.0",
|
92
94
|
"@aws-amplify/platform-core": "^0.2.0",
|
93
95
|
"@aws-amplify/plugin-types": "^0.4.1",
|
94
96
|
"charenc": "^0.0.2",
|
@@ -96,8 +98,8 @@
|
|
96
98
|
"fs-extra": "^8.1.0",
|
97
99
|
"graceful-fs": "^4.2.11",
|
98
100
|
"graphql": "^15.5.0",
|
99
|
-
"graphql-mapping-template": "4.20.
|
100
|
-
"graphql-transformer-common": "4.
|
101
|
+
"graphql-mapping-template": "4.20.15",
|
102
|
+
"graphql-transformer-common": "4.29.1-gen2-release.0",
|
101
103
|
"hjson": "^3.2.2",
|
102
104
|
"immer": "^9.0.12",
|
103
105
|
"is-buffer": "^2.0.5",
|
@@ -112,7 +114,7 @@
|
|
112
114
|
"zod": "^3.22.3"
|
113
115
|
},
|
114
116
|
"devDependencies": {
|
115
|
-
"@aws-amplify/graphql-transformer-test-utils": "0.4.
|
117
|
+
"@aws-amplify/graphql-transformer-test-utils": "0.4.8-gen2-release.0",
|
116
118
|
"@types/fs-extra": "^8.0.1",
|
117
119
|
"@types/node": "^12.12.6",
|
118
120
|
"aws-cdk-lib": "2.80.0",
|
@@ -177,5 +179,5 @@
|
|
177
179
|
"/__tests__/"
|
178
180
|
]
|
179
181
|
},
|
180
|
-
"gitHead": "
|
182
|
+
"gitHead": "a550843921e81b923214a9038b0725ac5e6b2b67"
|
181
183
|
}
|
@@ -17,8 +17,18 @@ type AuthorizationConfigMode =
|
|
17
17
|
| (ApiKeyAuthorizationConfig & { type: 'API_KEY' })
|
18
18
|
| (LambdaAuthorizationConfig & { type: 'AWS_LAMBDA' });
|
19
19
|
|
20
|
-
|
21
|
-
|
20
|
+
/**
|
21
|
+
* Validates authorization modes.
|
22
|
+
*
|
23
|
+
* Rules:
|
24
|
+
* 1. Validates that deprecated settings ('iamConfig.authenticatedUserRole', 'iamConfig.unauthenticatedUserRole',
|
25
|
+
* 'iamConfig.identityPoolId', 'iamConfig.allowListedRoles' and 'adminRoles') are mutually exclusive with new settings that
|
26
|
+
* replaced them ('iamConfig.enableIamAuthorizationMode' and any of 'authorizationModes.identityPoolConfig')
|
27
|
+
* 2. If deprecated identity pool settings are used ('iamConfig.authenticatedUserRole', 'iamConfig.unauthenticatedUserRole',
|
28
|
+
* and 'iamConfig.identityPoolId') validate that all are provided.
|
29
|
+
*/
|
30
|
+
export const validateAuthorizationModes = (authorizationModes: AuthorizationModes): void => {
|
31
|
+
const hasAnyDeprecatedIdentityPoolSetting =
|
22
32
|
authorizationModes.iamConfig?.authenticatedUserRole ||
|
23
33
|
authorizationModes.iamConfig?.unauthenticatedUserRole ||
|
24
34
|
authorizationModes.iamConfig?.identityPoolId;
|
@@ -26,23 +36,23 @@ export const validateAuthorizationModes = (authorizationModes: AuthorizationMode
|
|
26
36
|
authorizationModes.iamConfig?.authenticatedUserRole &&
|
27
37
|
authorizationModes.iamConfig?.unauthenticatedUserRole &&
|
28
38
|
authorizationModes.iamConfig?.identityPoolId;
|
29
|
-
const
|
39
|
+
const hasDeprecatedIamSettings =
|
30
40
|
authorizationModes.iamConfig?.authenticatedUserRole ||
|
31
41
|
authorizationModes.iamConfig?.unauthenticatedUserRole ||
|
32
42
|
authorizationModes.iamConfig?.identityPoolId ||
|
33
43
|
authorizationModes.iamConfig?.allowListedRoles ||
|
34
44
|
authorizationModes.adminRoles;
|
35
|
-
const
|
45
|
+
const hasUnDeprecatedIamSettings =
|
36
46
|
typeof authorizationModes.iamConfig?.enableIamAuthorizationMode !== 'undefined' || authorizationModes.identityPoolConfig;
|
37
47
|
|
38
|
-
if (
|
48
|
+
if (hasDeprecatedIamSettings && hasUnDeprecatedIamSettings) {
|
39
49
|
throw new Error(
|
40
|
-
|
41
|
-
" or '
|
50
|
+
'Invalid authorization modes configuration provided. ' +
|
51
|
+
"Deprecated IAM configuration cannot be used with identity pool configuration or when 'enableIamAuthorizationMode' is specified.",
|
42
52
|
);
|
43
53
|
}
|
44
54
|
|
45
|
-
if (
|
55
|
+
if (hasAnyDeprecatedIdentityPoolSetting && !hasAllDeprecatedIdentityPoolSettings) {
|
46
56
|
throw new Error(
|
47
57
|
"'authorizationModes.iamConfig.authenticatedUserRole', 'authorizationModes.iamConfig.unauthenticatedUserRole' and" +
|
48
58
|
" 'authorizationModes.iamConfig.identityPoolId' must be provided.",
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { RemovalPolicy } from 'aws-cdk-lib';
|
2
|
-
import { Bucket, IBucket } from 'aws-cdk-lib/aws-s3';
|
1
|
+
import { RemovalPolicy, Fn } from 'aws-cdk-lib';
|
2
|
+
import { Bucket, HttpMethods, IBucket } from 'aws-cdk-lib/aws-s3';
|
3
3
|
import { BucketDeployment, Source } from 'aws-cdk-lib/aws-s3-deployment';
|
4
4
|
import { Construct } from 'constructs';
|
5
5
|
|
@@ -8,6 +8,7 @@ export type CodegenAssetsProps = {
|
|
8
8
|
};
|
9
9
|
|
10
10
|
const MODEL_SCHEMA_KEY = 'model-schema.graphql';
|
11
|
+
const CONSOLE_SERVICE_ENDPOINT = Fn.join('', ['https://', Fn.ref('AWS::Region'), '.console.aws.amazon.com/amplify']);
|
11
12
|
|
12
13
|
/**
|
13
14
|
* Construct an S3 URI string for a given bucket and key.
|
@@ -30,6 +31,14 @@ export class CodegenAssets extends Construct {
|
|
30
31
|
const bucket = new Bucket(this, `${id}Bucket`, {
|
31
32
|
removalPolicy: RemovalPolicy.DESTROY,
|
32
33
|
autoDeleteObjects: true,
|
34
|
+
// Enabling CORS to allow console to access the codegen assets.
|
35
|
+
cors: [
|
36
|
+
{
|
37
|
+
allowedMethods: [HttpMethods.GET, HttpMethods.HEAD],
|
38
|
+
allowedHeaders: ['*'],
|
39
|
+
allowedOrigins: [CONSOLE_SERVICE_ENDPOINT],
|
40
|
+
},
|
41
|
+
],
|
33
42
|
});
|
34
43
|
|
35
44
|
const deployment = new BucketDeployment(this, `${id}Deployment`, {
|
@@ -6,7 +6,12 @@ import {
|
|
6
6
|
isMutationNode,
|
7
7
|
fieldsWithSqlDirective,
|
8
8
|
} from '@aws-amplify/graphql-transformer-core';
|
9
|
-
import {
|
9
|
+
import {
|
10
|
+
DataSourceStrategiesProvider,
|
11
|
+
isSqlModelDataSourceSsmDbConnectionConfig,
|
12
|
+
isSqlModelDataSourceSecretsManagerDbConnectionConfig,
|
13
|
+
} from '@aws-amplify/graphql-transformer-interfaces';
|
14
|
+
import { Token, Arn, ArnFormat } from 'aws-cdk-lib';
|
10
15
|
import {
|
11
16
|
CustomSqlDataSourceStrategy as ConstructCustomSqlDataSourceStrategy,
|
12
17
|
ModelDataSourceStrategy as ConstructModelDataSourceStrategy,
|
@@ -184,19 +189,47 @@ export const schemaByMergingDefinitions = (definitions: IAmplifyGraphqlDefinitio
|
|
184
189
|
* @param strategy user provided model data source strategy
|
185
190
|
* @returns validates and throws an error if the strategy is invalid
|
186
191
|
*/
|
187
|
-
export const validateDataSourceStrategy = (strategy: ConstructModelDataSourceStrategy) => {
|
192
|
+
export const validateDataSourceStrategy = (strategy: ConstructModelDataSourceStrategy): void => {
|
188
193
|
if (!isSqlStrategy(strategy)) {
|
189
194
|
return;
|
190
195
|
}
|
191
196
|
|
192
197
|
const dbConnectionConfig = strategy.dbConnectionConfig;
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
strategy
|
198
|
-
|
199
|
-
|
198
|
+
if (isSqlModelDataSourceSsmDbConnectionConfig(dbConnectionConfig)) {
|
199
|
+
const invalidSSMPaths = Object.values(dbConnectionConfig).filter((value) => typeof value === 'string' && !isValidSSMPath(value));
|
200
|
+
if (invalidSSMPaths.length > 0) {
|
201
|
+
throw new Error(
|
202
|
+
`Invalid data source strategy "${
|
203
|
+
strategy.name
|
204
|
+
}". Following SSM paths must start with '/' in dbConnectionConfig: ${invalidSSMPaths.join(', ')}.`,
|
205
|
+
);
|
206
|
+
}
|
207
|
+
} else if (isSqlModelDataSourceSecretsManagerDbConnectionConfig(dbConnectionConfig)) {
|
208
|
+
if (!Token.isUnresolved(dbConnectionConfig.secretArn)) {
|
209
|
+
try {
|
210
|
+
const arnComponents = Arn.split(dbConnectionConfig.secretArn, ArnFormat.COLON_RESOURCE_NAME);
|
211
|
+
if (arnComponents.service !== 'secretsmanager' || arnComponents.resource !== 'secret') {
|
212
|
+
// error message does not matter because it inside try/catch
|
213
|
+
throw new Error();
|
214
|
+
}
|
215
|
+
} catch {
|
216
|
+
throw new Error(`Invalid data source strategy "${strategy.name}". The value of secretArn is not a valid Secrets Manager ARN.`);
|
217
|
+
}
|
218
|
+
}
|
219
|
+
|
220
|
+
if (dbConnectionConfig.keyArn && !Token.isUnresolved(dbConnectionConfig.keyArn)) {
|
221
|
+
try {
|
222
|
+
const arnComponents = Arn.split(dbConnectionConfig.keyArn, ArnFormat.SLASH_RESOURCE_NAME);
|
223
|
+
if (arnComponents.service !== 'kms' || arnComponents.resource !== 'key') {
|
224
|
+
// error message does not matter because it inside try/catch
|
225
|
+
throw new Error();
|
226
|
+
}
|
227
|
+
} catch {
|
228
|
+
throw new Error(`Invalid data source strategy "${strategy.name}". The value of keyArn is not a valid KMS ARN.`);
|
229
|
+
}
|
230
|
+
}
|
231
|
+
} else {
|
232
|
+
throw new Error(`Invalid data source strategy "${strategy.name}". dbConnectionConfig does not include SSM paths or Secret ARN.`);
|
200
233
|
}
|
201
234
|
};
|
202
235
|
|
@@ -116,12 +116,44 @@ export interface SubnetAvailabilityZone {
|
|
116
116
|
readonly availabilityZone: string;
|
117
117
|
}
|
118
118
|
|
119
|
+
/**
|
120
|
+
* The credentials the lambda data source will use to connect to the database.
|
121
|
+
*
|
122
|
+
* @experimental
|
123
|
+
*/
|
124
|
+
export type SqlModelDataSourceDbConnectionConfig =
|
125
|
+
| SqlModelDataSourceSecretsManagerDbConnectionConfig
|
126
|
+
| SqlModelDataSourceSsmDbConnectionConfig;
|
127
|
+
|
128
|
+
/**
|
129
|
+
* The credentials stored in Secrets Manager that the lambda data source will use to connect to the database.
|
130
|
+
*
|
131
|
+
* The managed secret should be in the same region as the lambda.
|
132
|
+
* @experimental
|
133
|
+
*/
|
134
|
+
export interface SqlModelDataSourceSecretsManagerDbConnectionConfig {
|
135
|
+
/** The ARN of the managed secret with username, password, and hostname to use when connecting to the database. **/
|
136
|
+
readonly secretArn: string;
|
137
|
+
|
138
|
+
/** The ARN of the customer managed encryption key for the secret. If not supplied, the secret is expected to be encrypted with the default AWS-managed key. **/
|
139
|
+
readonly keyArn?: string;
|
140
|
+
|
141
|
+
/** The port number of the database proxy, cluster, or instance. */
|
142
|
+
readonly port: number;
|
143
|
+
|
144
|
+
/** The database name. */
|
145
|
+
readonly databaseName: string;
|
146
|
+
|
147
|
+
/** The hostame of the database. */
|
148
|
+
readonly hostname: string;
|
149
|
+
}
|
150
|
+
|
119
151
|
/**
|
120
152
|
* The Secure Systems Manager parameter paths the Lambda data source will use to connect to the database.
|
121
153
|
*
|
122
154
|
* These parameters are retrieved from Secure Systems Manager in the same region as the Lambda.
|
123
155
|
*/
|
124
|
-
export interface
|
156
|
+
export interface SqlModelDataSourceSsmDbConnectionConfig {
|
125
157
|
/** The Secure Systems Manager parameter containing the hostname of the database. For RDS-based SQL data sources, this can be the hostname
|
126
158
|
* of a database proxy, cluster, or instance.
|
127
159
|
*/
|
@@ -1,7 +1,12 @@
|
|
1
1
|
import * as fs from 'fs';
|
2
2
|
import * as path from 'path';
|
3
3
|
import { isSqlDbType } from '@aws-amplify/graphql-transformer-core';
|
4
|
-
import {
|
4
|
+
import {
|
5
|
+
SQLLambdaModelDataSourceStrategy,
|
6
|
+
SqlModelDataSourceDbConnectionConfig,
|
7
|
+
SqlModelDataSourceSsmDbConnectionConfig,
|
8
|
+
SqlModelDataSourceSecretsManagerDbConnectionConfig,
|
9
|
+
} from './model-datasource-strategy-types';
|
5
10
|
|
6
11
|
/**
|
7
12
|
* Type predicate that returns true if the object is a SQLLambdaModelDataSourceStrategy.
|
@@ -24,6 +29,15 @@ export const isSQLLambdaModelDataSourceStrategy = (obj: any): obj is SQLLambdaMo
|
|
24
29
|
* @returns true if the object is shaped like a SqlModelDataSourceDbConnectionConfig
|
25
30
|
*/
|
26
31
|
export const isSqlModelDataSourceDbConnectionConfig = (obj: any): obj is SqlModelDataSourceDbConnectionConfig => {
|
32
|
+
return isSqlModelDataSourceSsmDbConnectionConfig(obj) || isSqlModelDataSourceSecretsManagerDbConnectionConfig(obj);
|
33
|
+
};
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Type predicate that returns true if the object is a SqlModelDataSourceSsmDbConnectionConfig.
|
37
|
+
* @param obj the object to inspect
|
38
|
+
* @returns true if the object is shaped like a SqlModelDataSourceSsmDbConnectionConfig
|
39
|
+
*/
|
40
|
+
export const isSqlModelDataSourceSsmDbConnectionConfig = (obj: any): obj is SqlModelDataSourceSsmDbConnectionConfig => {
|
27
41
|
return (
|
28
42
|
(typeof obj === 'object' || typeof obj === 'function') &&
|
29
43
|
typeof obj.hostnameSsmPath === 'string' &&
|
@@ -34,6 +48,23 @@ export const isSqlModelDataSourceDbConnectionConfig = (obj: any): obj is SqlMode
|
|
34
48
|
);
|
35
49
|
};
|
36
50
|
|
51
|
+
/**
|
52
|
+
* Type predicate that returns true if the object is a SqlModelDataSourceSecretsManagerDbConnectionConfig.
|
53
|
+
* @param obj the object to inspect
|
54
|
+
* @returns true if the object is shaped like a SqlModelDataSourceSecretsManagerDbConnectionConfig
|
55
|
+
*/
|
56
|
+
export const isSqlModelDataSourceSecretsManagerDbConnectionConfig = (
|
57
|
+
obj: any,
|
58
|
+
): obj is SqlModelDataSourceSecretsManagerDbConnectionConfig => {
|
59
|
+
return (
|
60
|
+
(typeof obj === 'object' || typeof obj === 'function') &&
|
61
|
+
typeof obj.secretArn === 'string' &&
|
62
|
+
typeof obj.port === 'number' &&
|
63
|
+
typeof obj.databaseName === 'string' &&
|
64
|
+
typeof obj.hostname == 'string'
|
65
|
+
);
|
66
|
+
};
|
67
|
+
|
37
68
|
/**
|
38
69
|
* Class exposing utilities to produce SQLLambdaModelDataSourceStrategy objects given various inputs.
|
39
70
|
*/
|
File without changes
|