@aws-amplify/graphql-api-construct 1.8.0 → 1.9.0-0411-gen2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.jsii +313 -200
- package/API.md +16 -3
- package/CHANGELOG.md +7 -0
- package/lib/amplify-dynamodb-table-wrapper.js +1 -1
- package/lib/amplify-graphql-api.js +3 -2
- package/lib/amplify-graphql-definition.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/internal/authorization-modes.d.ts +12 -1
- package/lib/internal/authorization-modes.js +47 -7
- package/lib/internal/codegen-assets.js +10 -1
- package/lib/sql-model-datasource-strategy.js +1 -1
- package/lib/types.d.ts +51 -5
- package/lib/types.js +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/API.md +3 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +7 -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 +34 -22
- 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/constants.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/constants.js +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/constants.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.d.ts +2 -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.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.d.ts +2 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.js +22 -11
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.js +11 -4
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/warnings.d.ts +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/warnings.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/warnings.js +10 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/warnings.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 +20 -10
- 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 +9 -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 +16 -9
- 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.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.create.js +5 -4
- 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.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.delete.js +5 -4
- 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.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.update.js +5 -4
- 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.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/search.js +5 -4
- 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 +2 -2
- 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 +3 -2
- 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 +27 -16
- 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/rds/resolvers/mutation.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/mutation.js +5 -5
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/mutation.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/query.js +3 -3
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/query.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/subscription.js +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/subscription.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 +13 -13
- package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +8 -8
- package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-directives/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.js +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-directives/package.json +3 -2
- package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-function-transformer/package.json +7 -7
- package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +7 -7
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +6 -0
- 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 +8 -8
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +4 -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/package.json +11 -11
- package/node_modules/@aws-amplify/graphql-model-transformer/API.md +3 -3
- package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.d.ts +1 -0
- 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 +2 -1
- 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.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js +29 -16
- 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/graphql-types/common.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/common.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/common.js +11 -7
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/common.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 +18 -9
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.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/package.json +7 -7
- package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +7 -7
- package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.d.ts +3 -4
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.js +7 -4
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.js.map +1 -1
- 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 +35 -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 +4 -5
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.js +8 -5
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.d.ts +2 -2
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.js +19 -4
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.d.ts +1 -1
- 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 +6 -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 +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 -9
- 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 +5 -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.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.d.ts +2 -3
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.js +6 -2
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.js.map +1 -1
- 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 +44 -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 +4 -5
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.js +7 -4
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.js +18 -3
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.d.ts +3 -4
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.js +7 -4
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.js.map +1 -1
- 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 +44 -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 +4 -5
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.js +7 -4
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.js +18 -3
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.js.map +1 -1
- 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 +7 -4
- 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 +11 -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 +213 -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/resolver/rds-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.js +1 -1
- 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/resolvers.d.ts +3 -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 +142 -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 +9 -9
- package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +6 -0
- 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 +14 -3
- 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 +8 -8
- package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.js +17 -8
- 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 +8 -8
- package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-transformer/package.json +15 -15
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/package.json +5 -5
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +2 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +7 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/synth-parameters.d.ts +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/synth-parameters.d.ts.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/transformer-context/synth-parameters.ts +1 -0
- 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-transformer-common/CHANGELOG.md +4 -0
- package/node_modules/graphql-transformer-common/package.json +2 -2
- package/package.json +19 -19
- package/src/amplify-graphql-api.ts +2 -0
- package/src/index.ts +1 -0
- package/src/internal/authorization-modes.ts +57 -8
- package/src/internal/codegen-assets.ts +11 -2
- package/src/types.ts +56 -5
@@ -0,0 +1,213 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DDBRelationalReferencesResolverGenerator = void 0;
|
4
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
5
|
+
const graphql_mapping_template_1 = require("graphql-mapping-template");
|
6
|
+
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
7
|
+
const graphql_model_transformer_1 = require("@aws-amplify/graphql-model-transformer");
|
8
|
+
const resolvers_1 = require("../resolvers");
|
9
|
+
const ddb_generator_1 = require("./ddb-generator");
|
10
|
+
const SORT_KEY_VALUE = 'sortKeyValue';
|
11
|
+
const CONNECTION_STACK = 'ConnectionStack';
|
12
|
+
const authFilter = (0, graphql_mapping_template_1.ref)('ctx.stash.authFilter');
|
13
|
+
const PARTITION_KEY_VALUE = 'partitionKeyValue';
|
14
|
+
class DDBRelationalReferencesResolverGenerator extends ddb_generator_1.DDBRelationalResolverGenerator {
|
15
|
+
constructor() {
|
16
|
+
super(...arguments);
|
17
|
+
this.makeQueryExpression = (references) => {
|
18
|
+
if (references.length > 1) {
|
19
|
+
const rangeKeyFields = references.slice(1);
|
20
|
+
const condensedSortKeyValue = (0, resolvers_1.condenseRangeKey)(rangeKeyFields);
|
21
|
+
return (0, graphql_mapping_template_1.obj)({
|
22
|
+
expression: (0, graphql_mapping_template_1.str)('#partitionKey = :partitionKey AND #sortKey = :sortKey'),
|
23
|
+
expressionNames: (0, graphql_mapping_template_1.obj)({
|
24
|
+
'#partitionKey': (0, graphql_mapping_template_1.str)(references[0]),
|
25
|
+
'#sortKey': (0, graphql_mapping_template_1.str)(condensedSortKeyValue),
|
26
|
+
}),
|
27
|
+
expressionValues: (0, graphql_mapping_template_1.obj)({
|
28
|
+
':partitionKey': (0, graphql_mapping_template_1.ref)(`util.dynamodb.toDynamoDB($${PARTITION_KEY_VALUE})`),
|
29
|
+
':sortKey': (0, graphql_mapping_template_1.ref)(`util.dynamodb.toDynamoDB($${condensedSortKeyValue})`),
|
30
|
+
}),
|
31
|
+
});
|
32
|
+
}
|
33
|
+
return (0, graphql_mapping_template_1.obj)({
|
34
|
+
expression: (0, graphql_mapping_template_1.str)('#partitionKey = :partitionKey'),
|
35
|
+
expressionNames: (0, graphql_mapping_template_1.obj)({
|
36
|
+
'#partitionKey': (0, graphql_mapping_template_1.str)(references[0]),
|
37
|
+
}),
|
38
|
+
expressionValues: (0, graphql_mapping_template_1.obj)({
|
39
|
+
':partitionKey': (0, graphql_mapping_template_1.ref)(`util.dynamodb.toDynamoDB($${PARTITION_KEY_VALUE})`),
|
40
|
+
}),
|
41
|
+
});
|
42
|
+
};
|
43
|
+
this.makeHasManyGetItemsConnectionWithKeyResolver = (config, ctx) => {
|
44
|
+
const { field, indexName, limit, object, references, relatedType } = config;
|
45
|
+
if (references.length < 1) {
|
46
|
+
throw new Error('references should be populated.');
|
47
|
+
}
|
48
|
+
const primaryKeyFields = (0, graphql_transformer_core_1.getPrimaryKeyFields)(object);
|
49
|
+
const dataSourceName = (0, graphql_transformer_core_1.getModelDataSourceNameForTypeName)(ctx, relatedType.name.value);
|
50
|
+
const dataSource = ctx.api.host.getDataSource(dataSourceName);
|
51
|
+
const setup = [
|
52
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('limit'), (0, graphql_mapping_template_1.ref)(`util.defaultIfNull($context.args.limit, ${limit})`)),
|
53
|
+
...primaryKeyFields
|
54
|
+
.slice(1)
|
55
|
+
.map((ca, idx) => (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(`${SORT_KEY_VALUE}${idx}`), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)(`ctx.stash.connectionAttibutes.get("${ca}")`), (0, graphql_mapping_template_1.ref)(`ctx.source.${ca}`)))),
|
56
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('query'), this.makeQueryExpression(references)),
|
57
|
+
];
|
58
|
+
setup.push(graphql_transformer_common_1.setArgs, (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.isNullOrEmpty)(authFilter)), (0, graphql_mapping_template_1.compoundExpression)([
|
59
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('filter'), authFilter),
|
60
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.isNullOrEmpty)((0, graphql_mapping_template_1.ref)('args.filter'))), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('filter'), (0, graphql_mapping_template_1.obj)({ and: (0, graphql_mapping_template_1.list)([(0, graphql_mapping_template_1.ref)('filter'), (0, graphql_mapping_template_1.ref)('args.filter')]) }))),
|
61
|
+
]), (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.isNullOrEmpty)((0, graphql_mapping_template_1.ref)('args.filter'))), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('filter'), (0, graphql_mapping_template_1.ref)('args.filter')))), (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.isNullOrEmpty)((0, graphql_mapping_template_1.ref)('filter'))), (0, graphql_mapping_template_1.compoundExpression)([
|
62
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('filterExpression'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.parseJson'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.transform.toDynamoDBFilterExpression'), (0, graphql_mapping_template_1.ref)('filter')))),
|
63
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.isNullOrBlank'), (0, graphql_mapping_template_1.ref)('filterExpression.expression'))), (0, graphql_mapping_template_1.compoundExpression)([
|
64
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('filterExpression.expressionValues.size')), (0, graphql_mapping_template_1.int)(0)), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('filterExpression.remove'), (0, graphql_mapping_template_1.str)('expressionValues')))),
|
65
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('filter'), (0, graphql_mapping_template_1.ref)('filterExpression')),
|
66
|
+
])),
|
67
|
+
])));
|
68
|
+
const queryArguments = {
|
69
|
+
query: (0, graphql_mapping_template_1.raw)('$util.toJson($query)'),
|
70
|
+
scanIndexForward: (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.ref)('context.args.sortDirection'), (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('context.args.sortDirection'), (0, graphql_mapping_template_1.str)('ASC')), (0, graphql_mapping_template_1.bool)(true), (0, graphql_mapping_template_1.bool)(false)), (0, graphql_mapping_template_1.bool)(true)),
|
71
|
+
filter: (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.ref)('filter'), (0, graphql_mapping_template_1.ref)('util.toJson($filter)'), (0, graphql_mapping_template_1.nul)()),
|
72
|
+
limit: (0, graphql_mapping_template_1.ref)('limit'),
|
73
|
+
nextToken: (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.ref)('context.args.nextToken'), (0, graphql_mapping_template_1.ref)('util.toJson($context.args.nextToken)'), (0, graphql_mapping_template_1.nul)()),
|
74
|
+
};
|
75
|
+
if (indexName) {
|
76
|
+
queryArguments.index = (0, graphql_mapping_template_1.str)(indexName);
|
77
|
+
}
|
78
|
+
const queryObj = graphql_mapping_template_1.DynamoDBMappingTemplate.query(queryArguments);
|
79
|
+
const resolverResourceId = graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID(object.name.value, field.name.value);
|
80
|
+
const resolver = ctx.resolvers.generateQueryResolver(object.name.value, field.name.value, resolverResourceId, dataSource, graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([
|
81
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('ctx.stash.deniedField'), (0, graphql_mapping_template_1.raw)('#return($util.toJson(null))')),
|
82
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(PARTITION_KEY_VALUE), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)(`ctx.stash.connectionAttributes.get("${primaryKeyFields[0]}")`), (0, graphql_mapping_template_1.ref)(`ctx.source.${primaryKeyFields[0]}`))),
|
83
|
+
(0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.isNull'), (0, graphql_mapping_template_1.ref)(PARTITION_KEY_VALUE)), (0, graphql_mapping_template_1.compoundExpression)([(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('result'), (0, graphql_mapping_template_1.obj)({ items: (0, graphql_mapping_template_1.list)([]) })), (0, graphql_mapping_template_1.raw)('#return($result)')]), (0, graphql_mapping_template_1.compoundExpression)([...setup, queryObj])),
|
84
|
+
])), `${object.name.value}.${field.name.value}.req.vtl`), graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)(graphql_mapping_template_1.DynamoDBMappingTemplate.dynamoDBResponse(false, (0, graphql_mapping_template_1.compoundExpression)([
|
85
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.raw)('!$result'), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('result'), (0, graphql_mapping_template_1.ref)('ctx.result'))),
|
86
|
+
(0, graphql_mapping_template_1.compoundExpression)([
|
87
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.source.get'), (0, graphql_mapping_template_1.str)(graphql_model_transformer_1.OPERATION_KEY)), (0, graphql_mapping_template_1.nul)()), (0, graphql_mapping_template_1.str)('Mutation')), (0, graphql_mapping_template_1.forEach)((0, graphql_mapping_template_1.ref)('item'), (0, graphql_mapping_template_1.ref)('result.items'), [(0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('item.put'), (0, graphql_mapping_template_1.str)(graphql_model_transformer_1.OPERATION_KEY), (0, graphql_mapping_template_1.str)('Mutation')))])),
|
88
|
+
(0, graphql_mapping_template_1.raw)('$util.toJson($result)'),
|
89
|
+
]),
|
90
|
+
]))), `${object.name.value}.${field.name.value}.res.vtl`));
|
91
|
+
resolver.setScope(ctx.stackManager.getScopeFor(resolverResourceId, CONNECTION_STACK));
|
92
|
+
ctx.resolvers.addResolver(object.name.value, field.name.value, resolver);
|
93
|
+
};
|
94
|
+
this.makeHasOneGetItemConnectionWithKeyResolver = (config, ctx) => {
|
95
|
+
const { field, indexName, references, object, relatedType } = config;
|
96
|
+
if (references.length < 1) {
|
97
|
+
throw new Error('references should be populated.');
|
98
|
+
}
|
99
|
+
const primaryKeyFields = (0, graphql_transformer_core_1.getPrimaryKeyFields)(object);
|
100
|
+
const dataSourceName = (0, graphql_transformer_core_1.getModelDataSourceNameForTypeName)(ctx, relatedType.name.value);
|
101
|
+
const dataSource = ctx.api.host.getDataSource(dataSourceName);
|
102
|
+
const partitionKeyName = references[0];
|
103
|
+
const totalExpressions = ['#partitionKey = :partitionValue'];
|
104
|
+
const totalExpressionNames = {
|
105
|
+
'#partitionKey': (0, graphql_mapping_template_1.str)(partitionKeyName),
|
106
|
+
};
|
107
|
+
const totalExpressionValues = {
|
108
|
+
':partitionValue': this.buildKeyValueExpression(references[0], relatedType, true),
|
109
|
+
};
|
110
|
+
if (references.length > 2) {
|
111
|
+
const rangeKeyFields = references.slice(1);
|
112
|
+
const sortKeyName = (0, resolvers_1.condenseRangeKey)(rangeKeyFields);
|
113
|
+
const condensedSortKeyValue = (0, resolvers_1.condenseRangeKey)(primaryKeyFields.slice(1).map((keyField) => `\${ctx.source.${keyField}}`));
|
114
|
+
totalExpressions.push('#sortKeyName = :sortKeyName');
|
115
|
+
totalExpressionNames['#sortKeyName'] = (0, graphql_mapping_template_1.str)(sortKeyName);
|
116
|
+
totalExpressionValues[':sortKeyName'] = (0, graphql_mapping_template_1.ref)(`util.parseJson($util.dynamodb.toDynamoDBJson($util.defaultIfNullOrBlank("${condensedSortKeyValue}", "${graphql_transformer_common_1.NONE_VALUE}")))`);
|
117
|
+
}
|
118
|
+
else if (references.length === 2) {
|
119
|
+
const sortKeyName = references[1];
|
120
|
+
totalExpressions.push('#sortKeyName = :sortKeyName');
|
121
|
+
totalExpressionNames['#sortKeyName'] = (0, graphql_mapping_template_1.str)(sortKeyName);
|
122
|
+
totalExpressionValues[':sortKeyName'] = this.buildKeyValueExpression(primaryKeyFields[1], ctx.output.getObject(object.name.value));
|
123
|
+
}
|
124
|
+
const resolverResourceId = graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID(object.name.value, field.name.value);
|
125
|
+
const resolver = ctx.resolvers.generateQueryResolver(object.name.value, field.name.value, resolverResourceId, dataSource, graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([
|
126
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('ctx.stash.deniedField'), (0, graphql_mapping_template_1.raw)('#return($util.toJson(null))')),
|
127
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(PARTITION_KEY_VALUE), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)(`ctx.stash.connectionAttibutes.get("${primaryKeyFields[0]}")`), (0, graphql_mapping_template_1.ref)(`ctx.source.${primaryKeyFields[0]}`))),
|
128
|
+
(0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.or)([
|
129
|
+
(0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.isNull'), (0, graphql_mapping_template_1.ref)(PARTITION_KEY_VALUE)),
|
130
|
+
...primaryKeyFields.slice(1).map((f) => (0, graphql_mapping_template_1.raw)(`$util.isNull($ctx.source.${f})`)),
|
131
|
+
]), (0, graphql_mapping_template_1.raw)('#return'), (0, graphql_mapping_template_1.compoundExpression)([
|
132
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('GetRequest'), (0, graphql_mapping_template_1.obj)({ version: (0, graphql_mapping_template_1.str)('2018-05-29'), operation: (0, graphql_mapping_template_1.str)('Query'), index: (0, graphql_mapping_template_1.str)(indexName) })),
|
133
|
+
(0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('GetRequest.put'), (0, graphql_mapping_template_1.str)('query'), (0, graphql_mapping_template_1.obj)({
|
134
|
+
expression: (0, graphql_mapping_template_1.str)(totalExpressions.join(' AND ')),
|
135
|
+
expressionNames: (0, graphql_mapping_template_1.obj)(totalExpressionNames),
|
136
|
+
expressionValues: (0, graphql_mapping_template_1.obj)(totalExpressionValues),
|
137
|
+
}))),
|
138
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.isNullOrEmpty)(authFilter)), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('GetRequest.put'), (0, graphql_mapping_template_1.str)('filter'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.parseJson'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.transform.toDynamoDBFilterExpression'), authFilter))))),
|
139
|
+
(0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('GetRequest')),
|
140
|
+
])),
|
141
|
+
])), `${object.name.value}.${field.name.value}.req.vtl`), graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)(graphql_mapping_template_1.DynamoDBMappingTemplate.dynamoDBResponse(false, (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.and)([(0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.ref)('ctx.result.items.isEmpty()')), (0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('ctx.result.scannedCount'), (0, graphql_mapping_template_1.int)(1))]), (0, graphql_mapping_template_1.compoundExpression)([
|
142
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('resultValue'), (0, graphql_mapping_template_1.ref)('ctx.result.items[0]')),
|
143
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('operation'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.source.get'), (0, graphql_mapping_template_1.str)(graphql_model_transformer_1.OPERATION_KEY)), (0, graphql_mapping_template_1.nul)())),
|
144
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('operation'), (0, graphql_mapping_template_1.str)('Mutation')), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('resultValue.put'), (0, graphql_mapping_template_1.str)(graphql_model_transformer_1.OPERATION_KEY), (0, graphql_mapping_template_1.str)('Mutation')))),
|
145
|
+
(0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('resultValue')),
|
146
|
+
]), (0, graphql_mapping_template_1.compoundExpression)([
|
147
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.and)([(0, graphql_mapping_template_1.ref)('ctx.result.items.isEmpty()'), (0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('ctx.result.scannedCount'), (0, graphql_mapping_template_1.int)(1))]), (0, graphql_mapping_template_1.ref)('util.unauthorized()')),
|
148
|
+
(0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.nul)()),
|
149
|
+
])))), `${object.name.value}.${field.name.value}.res.vtl`));
|
150
|
+
resolver.setScope(ctx.stackManager.getScopeFor(resolverResourceId, CONNECTION_STACK));
|
151
|
+
ctx.resolvers.addResolver(object.name.value, field.name.value, resolver);
|
152
|
+
};
|
153
|
+
this.makeBelongsToGetItemConnectionWithKeyResolver = (config, ctx) => {
|
154
|
+
const { field, references, object, relatedType } = config;
|
155
|
+
const table = (0, graphql_transformer_core_1.getTable)(ctx, relatedType);
|
156
|
+
const { keySchema } = table;
|
157
|
+
const dataSourceName = (0, graphql_transformer_core_1.getModelDataSourceNameForTypeName)(ctx, relatedType.name.value);
|
158
|
+
const dataSource = ctx.api.host.getDataSource(dataSourceName);
|
159
|
+
const partitionKeyName = keySchema[0].attributeName;
|
160
|
+
const totalExpressions = ['#partitionKey = :partitionValue'];
|
161
|
+
const totalExpressionNames = {
|
162
|
+
'#partitionKey': (0, graphql_mapping_template_1.str)(partitionKeyName),
|
163
|
+
};
|
164
|
+
const totalExpressionValues = {
|
165
|
+
':partitionValue': this.buildKeyValueExpression(references[0], ctx.output.getObject(object.name.value), true),
|
166
|
+
};
|
167
|
+
if (references.length > 2) {
|
168
|
+
const rangeKeyFields = references.slice(1);
|
169
|
+
const sortKeyName = keySchema[1].attributeName;
|
170
|
+
const condensedSortKeyValue = (0, resolvers_1.condenseRangeKey)(rangeKeyFields.map((keyField) => `\${ctx.source.${keyField}}`));
|
171
|
+
totalExpressions.push('#sortKeyName = :sortKeyName');
|
172
|
+
totalExpressionNames['#sortKeyName'] = (0, graphql_mapping_template_1.str)(sortKeyName);
|
173
|
+
totalExpressionValues[':sortKeyName'] = (0, graphql_mapping_template_1.ref)(`util.parseJson($util.dynamodb.toDynamoDBJson($util.defaultIfNullOrBlank("${condensedSortKeyValue}", "${graphql_transformer_common_1.NONE_VALUE}")))`);
|
174
|
+
}
|
175
|
+
else if (references.length === 2) {
|
176
|
+
const sortKeyName = keySchema[1].attributeName;
|
177
|
+
totalExpressions.push('#sortKeyName = :sortKeyName');
|
178
|
+
totalExpressionNames['#sortKeyName'] = (0, graphql_mapping_template_1.str)(sortKeyName);
|
179
|
+
totalExpressionValues[':sortKeyName'] = this.buildKeyValueExpression(references[1], ctx.output.getObject(object.name.value));
|
180
|
+
}
|
181
|
+
const resolverResourceId = graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID(object.name.value, field.name.value);
|
182
|
+
const resolver = ctx.resolvers.generateQueryResolver(object.name.value, field.name.value, resolverResourceId, dataSource, graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([
|
183
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('ctx.stash.deniedField'), (0, graphql_mapping_template_1.raw)('#return($util.toJson(null))')),
|
184
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(PARTITION_KEY_VALUE), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)(`ctx.stash.connectionAttibutes.get("${references[0]}")`), (0, graphql_mapping_template_1.ref)(`ctx.source.${references[0]}`))),
|
185
|
+
(0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.or)([
|
186
|
+
(0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.isNull'), (0, graphql_mapping_template_1.ref)(PARTITION_KEY_VALUE)),
|
187
|
+
...references.slice(1).map((f) => (0, graphql_mapping_template_1.raw)(`$util.isNull($ctx.source.${f})`)),
|
188
|
+
]), (0, graphql_mapping_template_1.raw)('#return'), (0, graphql_mapping_template_1.compoundExpression)([
|
189
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('GetRequest'), (0, graphql_mapping_template_1.obj)({ version: (0, graphql_mapping_template_1.str)('2018-05-29'), operation: (0, graphql_mapping_template_1.str)('Query') })),
|
190
|
+
(0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('GetRequest.put'), (0, graphql_mapping_template_1.str)('query'), (0, graphql_mapping_template_1.obj)({
|
191
|
+
expression: (0, graphql_mapping_template_1.str)(totalExpressions.join(' AND ')),
|
192
|
+
expressionNames: (0, graphql_mapping_template_1.obj)(totalExpressionNames),
|
193
|
+
expressionValues: (0, graphql_mapping_template_1.obj)(totalExpressionValues),
|
194
|
+
}))),
|
195
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.isNullOrEmpty)(authFilter)), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('GetRequest.put'), (0, graphql_mapping_template_1.str)('filter'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.parseJson'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.transform.toDynamoDBFilterExpression'), authFilter))))),
|
196
|
+
(0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('GetRequest')),
|
197
|
+
])),
|
198
|
+
])), `${object.name.value}.${field.name.value}.req.vtl`), graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)(graphql_mapping_template_1.DynamoDBMappingTemplate.dynamoDBResponse(false, (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.and)([(0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.ref)('ctx.result.items.isEmpty()')), (0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('ctx.result.scannedCount'), (0, graphql_mapping_template_1.int)(1))]), (0, graphql_mapping_template_1.compoundExpression)([
|
199
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('resultValue'), (0, graphql_mapping_template_1.ref)('ctx.result.items[0]')),
|
200
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('operation'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.source.get'), (0, graphql_mapping_template_1.str)(graphql_model_transformer_1.OPERATION_KEY)), (0, graphql_mapping_template_1.nul)())),
|
201
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('operation'), (0, graphql_mapping_template_1.str)('Mutation')), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('resultValue.put'), (0, graphql_mapping_template_1.str)(graphql_model_transformer_1.OPERATION_KEY), (0, graphql_mapping_template_1.str)('Mutation')))),
|
202
|
+
(0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('resultValue')),
|
203
|
+
]), (0, graphql_mapping_template_1.compoundExpression)([
|
204
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.and)([(0, graphql_mapping_template_1.ref)('ctx.result.items.isEmpty()'), (0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('ctx.result.scannedCount'), (0, graphql_mapping_template_1.int)(1))]), (0, graphql_mapping_template_1.ref)('util.unauthorized()')),
|
205
|
+
(0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.nul)()),
|
206
|
+
])))), `${object.name.value}.${field.name.value}.res.vtl`));
|
207
|
+
resolver.setScope(ctx.stackManager.getScopeFor(resolverResourceId, CONNECTION_STACK));
|
208
|
+
ctx.resolvers.addResolver(object.name.value, field.name.value, resolver);
|
209
|
+
};
|
210
|
+
}
|
211
|
+
}
|
212
|
+
exports.DDBRelationalReferencesResolverGenerator = DDBRelationalReferencesResolverGenerator;
|
213
|
+
//# sourceMappingURL=ddb-references-generator.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ddb-references-generator.js","sourceRoot":"","sources":["../../src/resolver/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+2,7 @@ import { TransformerContextProvider } from '@aws-amplify/graphql-transformer-int
|
|
2
2
|
import { BelongsToDirectiveConfiguration, HasManyDirectiveConfiguration, HasOneDirectiveConfiguration } from '../types';
|
3
3
|
export declare abstract class RelationalResolverGenerator {
|
4
4
|
abstract makeHasManyGetItemsConnectionWithKeyResolver(config: HasManyDirectiveConfiguration, ctx: TransformerContextProvider): void;
|
5
|
-
abstract makeHasOneGetItemConnectionWithKeyResolver(config: HasOneDirectiveConfiguration
|
6
|
-
abstract makeBelongsToGetItemConnectionWithKeyResolver(config:
|
5
|
+
abstract makeHasOneGetItemConnectionWithKeyResolver(config: HasOneDirectiveConfiguration, ctx: TransformerContextProvider): void;
|
6
|
+
abstract makeBelongsToGetItemConnectionWithKeyResolver(config: BelongsToDirectiveConfiguration, ctx: TransformerContextProvider): void;
|
7
7
|
}
|
8
8
|
//# sourceMappingURL=generator.d.ts.map
|
package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/resolver/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAExH,8BAAsB,2BAA2B;IAC/C,QAAQ,CAAC,4CAA4C,CAAC,MAAM,EAAE,6BAA6B,EAAE,GAAG,EAAE,0BAA0B,GAAG,IAAI;IACnI,QAAQ,CAAC,0CAA0C,
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/resolver/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAExH,8BAAsB,2BAA2B;IAC/C,QAAQ,CAAC,4CAA4C,CAAC,MAAM,EAAE,6BAA6B,EAAE,GAAG,EAAE,0BAA0B,GAAG,IAAI;IACnI,QAAQ,CAAC,0CAA0C,CAAC,MAAM,EAAE,4BAA4B,EAAE,GAAG,EAAE,0BAA0B,GAAG,IAAI;IAChI,QAAQ,CAAC,6CAA6C,CAAC,MAAM,EAAE,+BAA+B,EAAE,GAAG,EAAE,0BAA0B,GAAG,IAAI;CACvI"}
|
package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/resolver/generator.ts"],"names":[],"mappings":";;;AAGA,MAAsB,2BAA2B;
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/resolver/generator.ts"],"names":[],"mappings":";;;AAGA,MAAsB,2BAA2B;CAIhD;AAJD,kEAIC"}
|
package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rds-generator.d.ts","sourceRoot":"","sources":["../../src/resolver/rds-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AASzF,OAAO,EAWL,UAAU,EAQX,MAAM,0BAA0B,CAAC;
|
1
|
+
{"version":3,"file":"rds-generator.d.ts","sourceRoot":"","sources":["../../src/resolver/rds-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AASzF,OAAO,EAWL,UAAU,EAQX,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AACxH,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAI1D,qBAAa,8BAA+B,SAAQ,2BAA2B;IAM7E,4CAA4C,WAAY,6BAA6B,OAAO,0BAA0B,KAAG,IAAI,CAyC3H;IAKF,oCAAoC,cACvB,MAAM,aACN,MAAM,iBACF,MAAM,iBACN,UAAU,EAAE,KAC1B,MAAM,CAyBP;IAKF,mCAAmC,cACtB,MAAM,aACN,MAAM,iBACF,MAAM,iBACN,UAAU,EAAE,0BACH,MAAM,EAAE,KAC/B,MAAM,CAsBP;IAKF,yDAAyD,QAAO,MAAM,CAiBpE;IAEF,mDAAmD,QAAO,MAAM,CAkB9D;IAOF,0CAA0C,WAChC,4BAA4B,GAAG,+BAA+B,OACjE,0BAA0B,KAC9B,IAAI,CAgDL;IAEF,6CAA6C,WAAY,+BAA+B,OAAO,0BAA0B,KAAG,IAAI,CAmC9H;IAEF,0BAA0B,QAAO,UAAU,CAUzC;CACH"}
|
package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.js
CHANGED
@@ -4,8 +4,8 @@ exports.RDSRelationalResolverGenerator = void 0;
|
|
4
4
|
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
5
5
|
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
6
6
|
const graphql_mapping_template_1 = require("graphql-mapping-template");
|
7
|
-
const generator_1 = require("./generator");
|
8
7
|
const graphql_model_transformer_1 = require("@aws-amplify/graphql-model-transformer");
|
8
|
+
const generator_1 = require("./generator");
|
9
9
|
const CONNECTION_STACK = 'ConnectionStack';
|
10
10
|
class RDSRelationalResolverGenerator extends generator_1.RelationalResolverGenerator {
|
11
11
|
constructor() {
|
package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rds-generator.js","sourceRoot":"","sources":["../../src/resolver/rds-generator.ts"],"names":[],"mappings":";;;AACA,2EAAiE;AACjE,oFAM+C;AAC/C,uEAmBkC;AAElC,2CAA0D;AAC1D,sFAAuE;AAEvE,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAE3C,M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,IAAA,8BAAG,EAAC,EAAE,CAAC,CAAC,CAC9E,CACF;aACF,CAAC,CAAC;QACL,CAAC,CAAC;IACJ,CAAC;CAAA;AAzQD,wEAyQC"}
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import { TransformerContextProvider, TransformerPrepareStepContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
-
import { HasManyDirectiveConfiguration } from './types';
|
2
|
+
import { HasManyDirectiveConfiguration, HasOneDirectiveConfiguration } from './types';
|
3
|
+
export declare const updateTableForReferencesConnection: (config: HasManyDirectiveConfiguration | HasOneDirectiveConfiguration, ctx: TransformerContextProvider) => void;
|
3
4
|
export declare const updateTableForConnection: (config: HasManyDirectiveConfiguration, ctx: TransformerContextProvider) => void;
|
4
5
|
export declare const condenseRangeKey: (fields: string[]) => string;
|
5
6
|
export declare const setFieldMappingResolverReference: (context: TransformerPrepareStepContextProvider, mappedModelName: string, typeName: string, fieldName: string, isList?: boolean) => void;
|
7
|
+
export declare const updateRelatedModelMutationResolversForCompositeSortKeys: (config: HasManyDirectiveConfiguration | HasOneDirectiveConfiguration, ctx: TransformerContextProvider) => void;
|
6
8
|
//# sourceMappingURL=resolvers.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../src/resolvers.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../src/resolvers.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,0BAA0B,EAC1B,qCAAqC,EAEtC,MAAM,6CAA6C,CAAC;AAqBrD,OAAO,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAetF,eAAO,MAAM,kCAAkC,WACrC,6BAA6B,GAAG,4BAA4B,OAC/D,0BAA0B,KAC9B,IAwCF,CAAC;AAoCF,eAAO,MAAM,wBAAwB,WAAY,6BAA6B,OAAO,0BAA0B,KAAG,IA2CjH,CAAC;AAiFF,eAAO,MAAM,gBAAgB,WAAY,MAAM,EAAE,KAAG,MAEnD,CAAC;AAEF,eAAO,MAAM,gCAAgC,YAClC,qCAAqC,mBAC7B,MAAM,YACb,MAAM,aACL,MAAM,uBAEhB,IAMF,CAAC;AAeF,eAAO,MAAM,uDAAuD,WAC1D,6BAA6B,GAAG,4BAA4B,OAC/D,0BAA0B,KAC9B,IAwCF,CAAC"}
|
@@ -23,13 +23,55 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
23
|
return result;
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.setFieldMappingResolverReference = exports.condenseRangeKey = exports.updateTableForConnection = void 0;
|
26
|
+
exports.updateRelatedModelMutationResolversForCompositeSortKeys = exports.setFieldMappingResolverReference = exports.condenseRangeKey = exports.updateTableForConnection = exports.updateTableForReferencesConnection = void 0;
|
27
27
|
const graphql_index_transformer_1 = require("@aws-amplify/graphql-index-transformer");
|
28
|
+
const graphql_model_transformer_1 = require("@aws-amplify/graphql-model-transformer");
|
28
29
|
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
29
30
|
const cdk = __importStar(require("aws-cdk-lib"));
|
31
|
+
const graphql_mapping_template_1 = require("graphql-mapping-template");
|
30
32
|
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
31
33
|
const schema_1 = require("./schema");
|
32
34
|
const utils_1 = require("./utils");
|
35
|
+
const updateTableForReferencesConnection = (config, ctx) => {
|
36
|
+
const { referenceNodes, indexName, references, relatedType } = config;
|
37
|
+
if (references.length < 1 || referenceNodes.length < 1) {
|
38
|
+
throw new Error('references should not be empty here');
|
39
|
+
}
|
40
|
+
const relatedTable = (0, graphql_transformer_core_1.getTable)(ctx, relatedType);
|
41
|
+
const gsis = relatedTable.globalSecondaryIndexes;
|
42
|
+
if (gsis.some((gsi) => gsi.indexName === indexName)) {
|
43
|
+
return;
|
44
|
+
}
|
45
|
+
const referenceNode = referenceNodes[0];
|
46
|
+
const partitionKeyName = referenceNode.name.value;
|
47
|
+
const partitionKeyType = (0, graphql_index_transformer_1.attributeTypeFromType)(referenceNode.type, ctx);
|
48
|
+
const sortKeyReferenceNodes = referenceNodes.slice(1);
|
49
|
+
const sortKey = getReferencesBasedDDBSortKey(sortKeyReferenceNodes, ctx);
|
50
|
+
addGlobalSecondaryIndex(relatedTable, {
|
51
|
+
indexName: indexName,
|
52
|
+
partitionKey: { name: partitionKeyName, type: partitionKeyType },
|
53
|
+
sortKey: sortKey,
|
54
|
+
ctx: ctx,
|
55
|
+
relatedTypeName: relatedType.name.value,
|
56
|
+
});
|
57
|
+
};
|
58
|
+
exports.updateTableForReferencesConnection = updateTableForReferencesConnection;
|
59
|
+
const getReferencesBasedDDBSortKey = (sortKeyNodes, ctx) => {
|
60
|
+
if (sortKeyNodes.length === 1) {
|
61
|
+
return {
|
62
|
+
name: sortKeyNodes[0].name.value,
|
63
|
+
type: (0, graphql_index_transformer_1.attributeTypeFromType)(sortKeyNodes[0].type, ctx),
|
64
|
+
};
|
65
|
+
}
|
66
|
+
else if (sortKeyNodes.length > 1) {
|
67
|
+
const sortKeyFieldNames = sortKeyNodes.map((node) => node.name.value);
|
68
|
+
return {
|
69
|
+
name: (0, exports.condenseRangeKey)(sortKeyFieldNames),
|
70
|
+
type: 'S',
|
71
|
+
};
|
72
|
+
}
|
73
|
+
return undefined;
|
74
|
+
};
|
33
75
|
const updateTableForConnection = (config, ctx) => {
|
34
76
|
const { fields, indexName: incomingIndexName } = config;
|
35
77
|
if (incomingIndexName || fields.length > 0) {
|
@@ -49,26 +91,37 @@ const updateTableForConnection = (config, ctx) => {
|
|
49
91
|
const partitionKeyType = respectPrimaryKeyAttributesOnConnectionField
|
50
92
|
? (0, graphql_index_transformer_1.attributeTypeFromType)((0, utils_1.getObjectPrimaryKey)(object).type, ctx)
|
51
93
|
: 'S';
|
52
|
-
const
|
53
|
-
? getConnectedSortKeyAttributeDefinitionsForImplicitHasManyObject(ctx, object, field)
|
94
|
+
const sortKey = respectPrimaryKeyAttributesOnConnectionField
|
95
|
+
? getConnectedSortKeyAttributeDefinitionsForImplicitHasManyObject(ctx, object, field, (0, schema_1.getSortKeyFields)(ctx, object))
|
54
96
|
: undefined;
|
97
|
+
addGlobalSecondaryIndex(table, {
|
98
|
+
indexName: indexName,
|
99
|
+
partitionKey: { name: partitionKeyName, type: partitionKeyType },
|
100
|
+
sortKey: sortKey,
|
101
|
+
ctx: ctx,
|
102
|
+
relatedTypeName: relatedType.name.value,
|
103
|
+
});
|
104
|
+
};
|
105
|
+
exports.updateTableForConnection = updateTableForConnection;
|
106
|
+
const addGlobalSecondaryIndex = (table, props) => {
|
107
|
+
const { indexName, partitionKey, sortKey, ctx, relatedTypeName } = props;
|
55
108
|
table.addGlobalSecondaryIndex({
|
56
109
|
indexName,
|
57
110
|
projectionType: 'ALL',
|
58
111
|
partitionKey: {
|
59
|
-
name:
|
60
|
-
type:
|
112
|
+
name: partitionKey.name,
|
113
|
+
type: partitionKey.type,
|
61
114
|
},
|
62
|
-
sortKey:
|
115
|
+
sortKey: sortKey
|
63
116
|
? {
|
64
|
-
name:
|
65
|
-
type:
|
117
|
+
name: sortKey.name,
|
118
|
+
type: sortKey.type,
|
66
119
|
}
|
67
120
|
: undefined,
|
68
121
|
readCapacity: cdk.Fn.ref(graphql_transformer_common_1.ResourceConstants.PARAMETERS.DynamoDBModelTableReadIOPS),
|
69
122
|
writeCapacity: cdk.Fn.ref(graphql_transformer_common_1.ResourceConstants.PARAMETERS.DynamoDBModelTableWriteIOPS),
|
70
123
|
});
|
71
|
-
const gsi =
|
124
|
+
const gsi = table.globalSecondaryIndexes.find((g) => g.indexName === indexName);
|
72
125
|
const newIndex = {
|
73
126
|
indexName,
|
74
127
|
keySchema: gsi.keySchema,
|
@@ -78,11 +131,9 @@ const updateTableForConnection = (config, ctx) => {
|
|
78
131
|
WriteCapacityUnits: cdk.Fn.ref(graphql_transformer_common_1.ResourceConstants.PARAMETERS.DynamoDBModelTableWriteIOPS),
|
79
132
|
}),
|
80
133
|
};
|
81
|
-
(0, graphql_index_transformer_1.overrideIndexAtCfnLevel)(ctx,
|
134
|
+
(0, graphql_index_transformer_1.overrideIndexAtCfnLevel)(ctx, relatedTypeName, table, newIndex);
|
82
135
|
};
|
83
|
-
|
84
|
-
const getConnectedSortKeyAttributeDefinitionsForImplicitHasManyObject = (ctx, object, hasManyField) => {
|
85
|
-
const sortKeyFields = (0, schema_1.getSortKeyFields)(ctx, object);
|
136
|
+
const getConnectedSortKeyAttributeDefinitionsForImplicitHasManyObject = (ctx, object, hasManyField, sortKeyFields) => {
|
86
137
|
if (!sortKeyFields.length) {
|
87
138
|
return undefined;
|
88
139
|
}
|
@@ -90,14 +141,14 @@ const getConnectedSortKeyAttributeDefinitionsForImplicitHasManyObject = (ctx, ob
|
|
90
141
|
const connectedSortKeyFieldNames = sortKeyFields.map((sortKeyField) => (0, utils_1.getConnectionAttributeName)(ctx.transformParameters, mappedObjectName, hasManyField.name.value, sortKeyField.name.value));
|
91
142
|
if (connectedSortKeyFieldNames.length === 1) {
|
92
143
|
return {
|
93
|
-
|
94
|
-
|
144
|
+
name: connectedSortKeyFieldNames[0],
|
145
|
+
type: (0, graphql_index_transformer_1.attributeTypeFromType)(sortKeyFields[0].type, ctx),
|
95
146
|
};
|
96
147
|
}
|
97
148
|
else if (sortKeyFields.length > 1) {
|
98
149
|
return {
|
99
|
-
|
100
|
-
|
150
|
+
name: (0, exports.condenseRangeKey)(connectedSortKeyFieldNames),
|
151
|
+
type: 'S',
|
101
152
|
};
|
102
153
|
}
|
103
154
|
return undefined;
|
@@ -114,4 +165,78 @@ const setFieldMappingResolverReference = (context, mappedModelName, typeName, fi
|
|
114
165
|
modelFieldMap.addResolverReference({ typeName: typeName, fieldName: fieldName, isList: isList });
|
115
166
|
};
|
116
167
|
exports.setFieldMappingResolverReference = setFieldMappingResolverReference;
|
168
|
+
const updateRelatedModelMutationResolversForCompositeSortKeys = (config, ctx) => {
|
169
|
+
const { relatedType, referenceNodes } = config;
|
170
|
+
if (referenceNodes.length < 3) {
|
171
|
+
return;
|
172
|
+
}
|
173
|
+
const objectName = ctx.output.getMutationTypeName();
|
174
|
+
if (!objectName) {
|
175
|
+
throw new Error(`
|
176
|
+
Mutation type name is undefined when updated mutation resolvers for composite sortKeys used in DDB references based relationships.
|
177
|
+
This should not happen, please file a bug at https://github.com/aws-amplify/amplify-category-api/issues/new/choose`);
|
178
|
+
}
|
179
|
+
const capitalizedName = (0, graphql_transformer_common_1.toUpper)(relatedType.name.value);
|
180
|
+
const operationTypes = ['update', 'create'];
|
181
|
+
operationTypes
|
182
|
+
.map((operationType) => ({
|
183
|
+
operationType: operationType,
|
184
|
+
resolver: ctx.resolvers.getResolver(objectName, `${operationType}${capitalizedName}`),
|
185
|
+
}))
|
186
|
+
.forEach((mutation) => {
|
187
|
+
if (!mutation.resolver) {
|
188
|
+
return;
|
189
|
+
}
|
190
|
+
const checks = [
|
191
|
+
validateCompositeSortKeyMutationArgumentSnippet(config, mutation.operationType),
|
192
|
+
ensureCompositeKeySnippet(config),
|
193
|
+
];
|
194
|
+
if (checks[0] || checks[1]) {
|
195
|
+
addIndexToResolverSlot(mutation.resolver, [mergeInputsAndDefaultsSnippet(), ...checks]);
|
196
|
+
}
|
197
|
+
});
|
198
|
+
};
|
199
|
+
exports.updateRelatedModelMutationResolversForCompositeSortKeys = updateRelatedModelMutationResolversForCompositeSortKeys;
|
200
|
+
const addIndexToResolverSlot = (resolver, lines, isSync = false) => {
|
201
|
+
const res = resolver;
|
202
|
+
res.addToSlot('preAuth', graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString(`${lines.join('\n')}\n${!isSync ? '{}' : ''}`, `${res.typeName}.${res.fieldName}.{slotName}.{slotIndex}.req.vtl`));
|
203
|
+
};
|
204
|
+
const mergeInputsAndDefaultsSnippet = () => {
|
205
|
+
return (0, graphql_mapping_template_1.printBlock)('Merge default values and inputs')((0, graphql_model_transformer_1.generateApplyDefaultsToInputTemplate)('mergedValues'));
|
206
|
+
};
|
207
|
+
const validateCompositeSortKeyMutationArgumentSnippet = (config, keyOperation) => {
|
208
|
+
const { indexName, references } = config;
|
209
|
+
const sortKeyFields = references.slice(1);
|
210
|
+
if (sortKeyFields.length < 2) {
|
211
|
+
return '';
|
212
|
+
}
|
213
|
+
return (0, graphql_mapping_template_1.printBlock)(`Validate ${keyOperation} mutation for global secondary index '${indexName}'`)((0, graphql_mapping_template_1.compoundExpression)([
|
214
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(graphql_transformer_common_1.ResourceConstants.SNIPPETS.HasSeenSomeKeyArg), (0, graphql_mapping_template_1.bool)(false)),
|
215
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('keyFieldNames'), (0, graphql_mapping_template_1.list)(sortKeyFields.map((f) => (0, graphql_mapping_template_1.str)(f)))),
|
216
|
+
(0, graphql_mapping_template_1.forEach)((0, graphql_mapping_template_1.ref)('keyFieldName'), (0, graphql_mapping_template_1.ref)('keyFieldNames'), [
|
217
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.raw)('$mergedValues.containsKey("$keyFieldName")'), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(graphql_transformer_common_1.ResourceConstants.SNIPPETS.HasSeenSomeKeyArg), (0, graphql_mapping_template_1.bool)(true)), true),
|
218
|
+
]),
|
219
|
+
(0, graphql_mapping_template_1.forEach)((0, graphql_mapping_template_1.ref)('keyFieldName'), (0, graphql_mapping_template_1.ref)('keyFieldNames'), [
|
220
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.raw)(`$${graphql_transformer_common_1.ResourceConstants.SNIPPETS.HasSeenSomeKeyArg} && !$mergedValues.containsKey("$keyFieldName")`), (0, graphql_mapping_template_1.raw)(`$util.error("When ${keyOperation.replace(/.$/, 'ing')} any part of the composite sort key for global secondary index '${indexName}',` +
|
221
|
+
" you must provide all fields for the key. Missing key: '$keyFieldName'.\")")),
|
222
|
+
]),
|
223
|
+
]));
|
224
|
+
};
|
225
|
+
const ensureCompositeKeySnippet = (config) => {
|
226
|
+
const { references } = config;
|
227
|
+
const sortKeyFields = references.slice(1);
|
228
|
+
if (sortKeyFields.length < 2) {
|
229
|
+
return '';
|
230
|
+
}
|
231
|
+
const argsPrefix = 'mergedValues';
|
232
|
+
const condensedSortKey = (0, exports.condenseRangeKey)(sortKeyFields);
|
233
|
+
const dynamoDBFriendlySortKeyName = (0, graphql_transformer_common_1.toCamelCase)(sortKeyFields.map((f) => (0, graphql_transformer_common_1.graphqlName)(f)));
|
234
|
+
const condensedSortKeyValue = sortKeyFields
|
235
|
+
.map((keyField) => `\${${argsPrefix}.${keyField}}`)
|
236
|
+
.join(graphql_transformer_common_1.ModelResourceIDs.ModelCompositeKeySeparator());
|
237
|
+
return (0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([
|
238
|
+
(0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.raw)(`$util.isNull($ctx.stash.metadata.${graphql_transformer_common_1.ResourceConstants.SNIPPETS.DynamoDBNameOverrideMap})`), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.stash.metadata.put'), (0, graphql_mapping_template_1.str)(graphql_transformer_common_1.ResourceConstants.SNIPPETS.DynamoDBNameOverrideMap), (0, graphql_mapping_template_1.raw)(`{ '${condensedSortKey}': "${dynamoDBFriendlySortKeyName}" }`))), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)(`ctx.stash.metadata.${graphql_transformer_common_1.ResourceConstants.SNIPPETS.DynamoDBNameOverrideMap}.put`), (0, graphql_mapping_template_1.raw)(`'${condensedSortKey}'`), (0, graphql_mapping_template_1.str)(dynamoDBFriendlySortKeyName)))),
|
239
|
+
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)(graphql_transformer_common_1.ResourceConstants.SNIPPETS.HasSeenSomeKeyArg), (0, graphql_mapping_template_1.qref)(`$ctx.args.input.put('${condensedSortKey}',"${condensedSortKeyValue}")`)),
|
240
|
+
]));
|
241
|
+
};
|
117
242
|
//# sourceMappingURL=resolvers.js.map
|