@aws-amplify/graphql-api-construct 1.8.0-sql-gen2.0 → 1.8.0-sql-gen2-1.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 +4 -2
- 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 +5 -2
- 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 +30 -19
- 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 +1 -1
- 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 +1 -1
- package/node_modules/@aws-amplify/graphql-function-transformer/package.json +7 -7
- package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +7 -7
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +4 -2
- 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 +1 -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/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 +3 -6
- 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 +1 -1
- 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 +4 -2
- 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 +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 +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 +1 -1
- 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 +18 -3
- 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.js +5 -6
- 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 +4 -7
- 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 +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 +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 +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 +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 +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 +9 -9
- package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +4 -2
- 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 +4 -2
- 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 +1 -1
- package/node_modules/@aws-amplify/graphql-transformer/package.json +15 -15
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +1 -1
- 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 +4 -2
- 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/LICENSE +201 -0
- package/node_modules/graphql-transformer-common/package.json +3 -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
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"has-one-directive-ddb-fields-transformer.js","sourceRoot":"","sources":["../../src/has-one/has-one-directive-ddb-fields-transformer.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"has-one-directive-ddb-fields-transformer.js","sourceRoot":"","sources":["../../src/has-one/has-one-directive-ddb-fields-transformer.ts"],"names":[],"mappings":";;;AAAA,oFAAoE;AAQpE,oCAAoH;AACpH,qEAA6D;AAQ7D,MAAa,mCAAmC;IAAhD;QACE,WAAM,GAAG,sCAAW,CAAC;QAErB,YAAO,GAAG,CAAC,OAA8C,EAAE,MAAoC,EAAQ,EAAE;YACvG,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;YAC3C,IAAA,wCAAgC,EAAC;gBAC/B,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;gBAChD,cAAc,EAAE,OAAO,CAAC,cAAc;gBACtC,YAAY,EAAE,SAAS;gBACvB,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK;gBACtC,WAAW,EAAE,MAAM,CAAC,WAAW;aAChC,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,oBAAe,GAAG,CAAC,OAAsD,EAAE,MAAoC,EAAQ,EAAE;YACvH,MAAM,CAAC,gBAAgB,GAAG,IAAA,2BAAmB,EAAC,MAAM,EAAE,OAAqC,CAAC,CAAC;QAC/F,CAAC,CAAC;QAEF,sBAAiB,GAAG,CAAC,OAAmC,EAAE,MAAoC,EAAQ,EAAE;YACtG,MAAM,SAAS,GAAG,IAAA,gCAAY,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC5C,SAAS,CAAC,0CAA0C,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACxE,CAAC,CAAC;QAEF,aAAQ,GAAG,CAAC,OAAmC,EAAE,MAAoC,EAAQ,EAAE;YAC7F,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAC;YAC1B,MAAM,CAAC,UAAU,GAAG,IAAA,sBAAc,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACtD,CAAC,CAAC;IACJ,CAAC;CAAA;AA3BD,kFA2BC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { TransformerContextProvider, TransformerPrepareStepContextProvider, TransformerTransformSchemaStepContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
+
import { DataSourceBasedDirectiveTransformer } from '../data-source-based-directive-transformer';
|
3
|
+
import { HasOneDirectiveConfiguration } from '../types';
|
4
|
+
export declare class HasOneDirectiveDDBReferencesTransformer implements DataSourceBasedDirectiveTransformer<HasOneDirectiveConfiguration> {
|
5
|
+
dbType: import("@aws-amplify/graphql-transformer-interfaces").ModelDataSourceStrategyDbType;
|
6
|
+
prepare: (context: TransformerPrepareStepContextProvider, config: HasOneDirectiveConfiguration) => void;
|
7
|
+
transformSchema: (context: TransformerTransformSchemaStepContextProvider, config: HasOneDirectiveConfiguration) => void;
|
8
|
+
generateResolvers: (context: TransformerContextProvider, config: HasOneDirectiveConfiguration) => void;
|
9
|
+
validate: (context: TransformerContextProvider, config: HasOneDirectiveConfiguration) => void;
|
10
|
+
}
|
11
|
+
//# sourceMappingURL=has-one-directive-ddb-references-transformer.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"has-one-directive-ddb-references-transformer.d.ts","sourceRoot":"","sources":["../../src/has-one/has-one-directive-ddb-references-transformer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,0BAA0B,EAC1B,qCAAqC,EACrC,6CAA6C,EAC9C,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,mCAAmC,EAAE,MAAM,4CAA4C,CAAC;AAGjG,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AASxD,qBAAa,uCAAwC,YAAW,mCAAmC,CAAC,4BAA4B,CAAC;IAC/H,MAAM,sFAAe;IAErB,OAAO,YAAa,qCAAqC,UAAU,4BAA4B,KAAG,IAAI,CAUpG;IAEF,eAAe,YAAa,6CAA6C,UAAU,4BAA4B,KAAG,IAAI,CAEpH;IAEF,iBAAiB,YAAa,0BAA0B,UAAU,4BAA4B,KAAG,IAAI,CAGnG;IAEF,QAAQ,YAAa,0BAA0B,UAAU,4BAA4B,KAAG,IAAI,CAG1F;CACH"}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.HasOneDirectiveDDBReferencesTransformer = void 0;
|
4
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
5
|
+
const ddb_references_generator_1 = require("../resolver/ddb-references-generator");
|
6
|
+
const resolvers_1 = require("../resolvers");
|
7
|
+
const utils_1 = require("../utils");
|
8
|
+
class HasOneDirectiveDDBReferencesTransformer {
|
9
|
+
constructor() {
|
10
|
+
this.dbType = graphql_transformer_core_1.DDB_DB_TYPE;
|
11
|
+
this.prepare = (context, config) => {
|
12
|
+
var _a, _b;
|
13
|
+
const modelName = config.object.name.value;
|
14
|
+
(0, resolvers_1.setFieldMappingResolverReference)(context, (_b = (_a = config.relatedType) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.value, modelName, config.field.name.value, true);
|
15
|
+
(0, utils_1.registerHasOneForeignKeyMappings)({
|
16
|
+
transformParameters: context.transformParameters,
|
17
|
+
resourceHelper: context.resourceHelper,
|
18
|
+
thisTypeName: modelName,
|
19
|
+
thisFieldName: config.field.name.value,
|
20
|
+
relatedType: config.relatedType,
|
21
|
+
});
|
22
|
+
};
|
23
|
+
this.transformSchema = (context, config) => {
|
24
|
+
(0, utils_1.validateParentReferencesFields)(config, context);
|
25
|
+
};
|
26
|
+
this.generateResolvers = (context, config) => {
|
27
|
+
(0, resolvers_1.updateTableForReferencesConnection)(config, context);
|
28
|
+
new ddb_references_generator_1.DDBRelationalReferencesResolverGenerator().makeHasOneGetItemConnectionWithKeyResolver(config, context);
|
29
|
+
};
|
30
|
+
this.validate = (context, config) => {
|
31
|
+
(0, utils_1.ensureReferencesArray)(config);
|
32
|
+
config.referenceNodes = (0, utils_1.getReferencesNodes)(config, context);
|
33
|
+
};
|
34
|
+
}
|
35
|
+
}
|
36
|
+
exports.HasOneDirectiveDDBReferencesTransformer = HasOneDirectiveDDBReferencesTransformer;
|
37
|
+
//# sourceMappingURL=has-one-directive-ddb-references-transformer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"has-one-directive-ddb-references-transformer.js","sourceRoot":"","sources":["../../src/has-one/has-one-directive-ddb-references-transformer.ts"],"names":[],"mappings":";;;AAAA,oFAAoE;AAOpE,mFAAgG;AAChG,4CAAoG;AAEpG,oCAAuI;AAQvI,MAAa,uCAAuC;IAApD;QACE,WAAM,GAAG,sCAAW,CAAC;QA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from '../types';
|
1
|
+
import { TransformerContextProvider, TransformerPrepareStepContextProvider, TransformerTransformSchemaStepContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
3
2
|
import { DataSourceBasedDirectiveTransformer } from '../data-source-based-directive-transformer';
|
3
|
+
import { HasOneDirectiveConfiguration } from '../types';
|
4
4
|
export declare class HasOneDirectiveSQLTransformer implements DataSourceBasedDirectiveTransformer<HasOneDirectiveConfiguration> {
|
5
|
-
dbType: ModelDataSourceStrategySqlDbType;
|
6
|
-
constructor(dbType: ModelDataSourceStrategySqlDbType);
|
5
|
+
dbType: import("@aws-amplify/graphql-transformer-interfaces").ModelDataSourceStrategySqlDbType;
|
7
6
|
prepare: (context: TransformerPrepareStepContextProvider, config: HasOneDirectiveConfiguration) => void;
|
8
7
|
transformSchema: (context: TransformerTransformSchemaStepContextProvider, config: HasOneDirectiveConfiguration) => void;
|
9
|
-
generateResolvers: (
|
8
|
+
generateResolvers: (context: TransformerContextProvider, config: HasOneDirectiveConfiguration) => void;
|
10
9
|
validate: (context: TransformerContextProvider, config: HasOneDirectiveConfiguration) => void;
|
11
10
|
}
|
12
11
|
//# sourceMappingURL=has-one-directive-sql-transformer.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"has-one-directive-sql-transformer.d.ts","sourceRoot":"","sources":["../../src/has-one/has-one-directive-sql-transformer.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"has-one-directive-sql-transformer.d.ts","sourceRoot":"","sources":["../../src/has-one/has-one-directive-sql-transformer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,0BAA0B,EAC1B,qCAAqC,EACrC,6CAA6C,EAC9C,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,mCAAmC,EAAE,MAAM,4CAA4C,CAAC;AAEjG,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAQxD,qBAAa,6BAA8B,YAAW,mCAAmC,CAAC,4BAA4B,CAAC;IACrH,MAAM,yFAAqC;IAE3C,OAAO,YAAa,qCAAqC,UAAU,4BAA4B,KAAG,IAAI,CAGpG;IAEF,eAAe,YAAa,6CAA6C,UAAU,4BAA4B,KAAG,IAAI,CAEpH;IAEF,iBAAiB,YAAa,0BAA0B,UAAU,4BAA4B,KAAG,IAAI,CAGnG;IAEF,QAAQ,YAAa,0BAA0B,UAAU,4BAA4B,KAAG,IAAI,CAG1F;CACH"}
|
@@ -1,10 +1,13 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.HasOneDirectiveSQLTransformer = void 0;
|
4
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
4
5
|
const resolvers_1 = require("../resolvers");
|
5
6
|
const utils_1 = require("../utils");
|
7
|
+
const generator_factory_1 = require("../resolver/generator-factory");
|
6
8
|
class HasOneDirectiveSQLTransformer {
|
7
|
-
constructor(
|
9
|
+
constructor() {
|
10
|
+
this.dbType = graphql_transformer_core_1.POSTGRES_DB_TYPE || graphql_transformer_core_1.MYSQL_DB_TYPE;
|
8
11
|
this.prepare = (context, config) => {
|
9
12
|
var _a, _b;
|
10
13
|
const modelName = config.object.name.value;
|
@@ -13,14 +16,14 @@ class HasOneDirectiveSQLTransformer {
|
|
13
16
|
this.transformSchema = (context, config) => {
|
14
17
|
(0, utils_1.validateParentReferencesFields)(config, context);
|
15
18
|
};
|
16
|
-
this.generateResolvers = (
|
17
|
-
|
19
|
+
this.generateResolvers = (context, config) => {
|
20
|
+
const generator = (0, generator_factory_1.getGenerator)(this.dbType);
|
21
|
+
generator.makeHasOneGetItemConnectionWithKeyResolver(config, context);
|
18
22
|
};
|
19
23
|
this.validate = (context, config) => {
|
20
24
|
(0, utils_1.ensureReferencesArray)(config);
|
21
25
|
(0, utils_1.getReferencesNodes)(config, context);
|
22
26
|
};
|
23
|
-
this.dbType = dbType;
|
24
27
|
}
|
25
28
|
}
|
26
29
|
exports.HasOneDirectiveSQLTransformer = HasOneDirectiveSQLTransformer;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"has-one-directive-sql-transformer.js","sourceRoot":"","sources":["../../src/has-one/has-one-directive-sql-transformer.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"has-one-directive-sql-transformer.js","sourceRoot":"","sources":["../../src/has-one/has-one-directive-sql-transformer.ts"],"names":[],"mappings":";;;AAAA,oFAAwF;AAOxF,4CAAgE;AAEhE,oCAAqG;AACrG,qEAA6D;AAM7D,MAAa,6BAA6B;IAA1C;QACE,WAAM,GAAG,2CAAgB,IAAI,wCAAa,CAAC;QAE3C,YAAO,GAAG,CAAC,OAA8C,EAAE,MAAoC,EAAQ,EAAE;;YACvG,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;YAC3C,IAAA,4CAAgC,EAAC,OAAO,EAAE,MAAA,MAAA,MAAM,CAAC,WAAW,0CAAE,IAAI,0CAAE,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACvH,CAAC,CAAC;QAEF,oBAAe,GAAG,CAAC,OAAsD,EAAE,MAAoC,EAAQ,EAAE;YACvH,IAAA,sCAA8B,EAAC,MAAM,EAAE,OAAqC,CAAC,CAAC;QAChF,CAAC,CAAC;QAEF,sBAAiB,GAAG,CAAC,OAAmC,EAAE,MAAoC,EAAQ,EAAE;YACtG,MAAM,SAAS,GAAG,IAAA,gCAAY,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC5C,SAAS,CAAC,0CAA0C,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACxE,CAAC,CAAC;QAEF,aAAQ,GAAG,CAAC,OAAmC,EAAE,MAAoC,EAAQ,EAAE;YAC7F,IAAA,6BAAqB,EAAC,MAAM,CAAC,CAAC;YAC9B,IAAA,0BAAkB,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACtC,CAAC,CAAC;IACJ,CAAC;CAAA;AArBD,sEAqBC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ModelDataSourceStrategyDbType } from '@aws-amplify/graphql-transformer-interfaces';
|
2
2
|
import { HasOneDirectiveConfiguration } from '../types';
|
3
3
|
import { DataSourceBasedDirectiveTransformer } from '../data-source-based-directive-transformer';
|
4
|
-
export declare const getHasOneDirectiveTransformer: (dbType: ModelDataSourceStrategyDbType) => DataSourceBasedDirectiveTransformer<HasOneDirectiveConfiguration>;
|
4
|
+
export declare const getHasOneDirectiveTransformer: (dbType: ModelDataSourceStrategyDbType, config: HasOneDirectiveConfiguration) => DataSourceBasedDirectiveTransformer<HasOneDirectiveConfiguration>;
|
5
5
|
//# sourceMappingURL=has-one-directive-transformer-factory.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"has-one-directive-transformer-factory.d.ts","sourceRoot":"","sources":["../../src/has-one/has-one-directive-transformer-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAC5F,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,mCAAmC,EAAE,MAAM,4CAA4C,CAAC;
|
1
|
+
{"version":3,"file":"has-one-directive-transformer-factory.d.ts","sourceRoot":"","sources":["../../src/has-one/has-one-directive-transformer-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAC5F,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,mCAAmC,EAAE,MAAM,4CAA4C,CAAC;AAUjG,eAAO,MAAM,6BAA6B,WAChC,6BAA6B,UAC7B,4BAA4B,KAEnC,oCAAoC,4BAA4B,CAyBlE,CAAC"}
|
@@ -3,13 +3,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getHasOneDirectiveTransformer = void 0;
|
4
4
|
const has_one_directive_ddb_fields_transformer_1 = require("./has-one-directive-ddb-fields-transformer");
|
5
5
|
const has_one_directive_sql_transformer_1 = require("./has-one-directive-sql-transformer");
|
6
|
-
const
|
6
|
+
const has_one_directive_ddb_references_transformer_1 = require("./has-one-directive-ddb-references-transformer");
|
7
|
+
const hasOneDirectiveMySqlTransformer = new has_one_directive_sql_transformer_1.HasOneDirectiveSQLTransformer();
|
8
|
+
const hasOneDirectivePostgresTransformer = new has_one_directive_sql_transformer_1.HasOneDirectiveSQLTransformer();
|
9
|
+
const hasOneDirectiveDdbFieldsTransformer = new has_one_directive_ddb_fields_transformer_1.HasOneDirectiveDDBFieldsTransformer();
|
10
|
+
const hasOneDirectiveDdbReferencesTransformer = new has_one_directive_ddb_references_transformer_1.HasOneDirectiveDDBReferencesTransformer();
|
11
|
+
const getHasOneDirectiveTransformer = (dbType, config) => {
|
7
12
|
switch (dbType) {
|
8
13
|
case 'MYSQL':
|
14
|
+
return hasOneDirectiveMySqlTransformer;
|
9
15
|
case 'POSTGRES':
|
10
|
-
return
|
16
|
+
return hasOneDirectivePostgresTransformer;
|
11
17
|
case 'DYNAMODB':
|
12
|
-
|
18
|
+
if (config.references) {
|
19
|
+
if (config.fields) {
|
20
|
+
throw new Error('Something went wrong >> cannot have both references and fields.');
|
21
|
+
}
|
22
|
+
if (config.references.length < 1) {
|
23
|
+
throw new Error(`Invalid @hasMany directive on ${config.field.name.value} - empty references list`);
|
24
|
+
}
|
25
|
+
return hasOneDirectiveDdbReferencesTransformer;
|
26
|
+
}
|
27
|
+
return hasOneDirectiveDdbFieldsTransformer;
|
13
28
|
}
|
14
29
|
};
|
15
30
|
exports.getHasOneDirectiveTransformer = getHasOneDirectiveTransformer;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"has-one-directive-transformer-factory.js","sourceRoot":"","sources":["../../src/has-one/has-one-directive-transformer-factory.ts"],"names":[],"mappings":";;;AAGA,yGAAiG;AACjG,2FAAoF;
|
1
|
+
{"version":3,"file":"has-one-directive-transformer-factory.js","sourceRoot":"","sources":["../../src/has-one/has-one-directive-transformer-factory.ts"],"names":[],"mappings":";;;AAGA,yGAAiG;AACjG,2FAAoF;AACpF,iHAAyG;AAEzG,MAAM,+BAA+B,GAAG,IAAI,iEAA6B,EAAE,CAAC;AAC5E,MAAM,kCAAkC,GAAG,IAAI,iEAA6B,EAAE,CAAC;AAC/E,MAAM,mCAAmC,GAAG,IAAI,8EAAmC,EAAE,CAAC;AACtF,MAAM,uCAAuC,GAAG,IAAI,sFAAuC,EAAE,CAAC;AAEvF,MAAM,6BAA6B,GAAG,CAC3C,MAAqC,EACrC,MAAoC,EAE+B,EAAE;IACrE,QAAQ,MAAM,EAAE;QACd,KAAK,OAAO;YACV,OAAO,+BAA+B,CAAC;QACzC,KAAK,UAAU;YACb,OAAO,kCAAkC,CAAC;QAC5C,KAAK,UAAU;YAGb,IAAI,MAAM,CAAC,UAAU,EAAE;gBAErB,IAAI,MAAM,CAAC,MAAM,EAAE;oBAEjB,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;iBACpF;gBACD,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;oBAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,0BAA0B,CAAC,CAAC;iBACrG;gBACD,OAAO,uCAAuC,CAAC;aAChD;YAID,OAAO,mCAAmC,CAAC;KAC9C;AACH,CAAC,CAAC;AA7BW,QAAA,6BAA6B,iCA6BxC"}
|
package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.d.ts
CHANGED
@@ -6,8 +6,9 @@ import { RelationalResolverGenerator } from './generator';
|
|
6
6
|
export declare class DDBRelationalResolverGenerator extends RelationalResolverGenerator {
|
7
7
|
makeExpression: (keySchema: any[], connectionAttributes: string[]) => ObjectNode;
|
8
8
|
makeHasManyGetItemsConnectionWithKeyResolver: (config: HasManyDirectiveConfiguration, ctx: TransformerContextProvider) => void;
|
9
|
-
makeHasOneGetItemConnectionWithKeyResolver: (config: HasOneDirectiveConfiguration
|
9
|
+
makeHasOneGetItemConnectionWithKeyResolver: (config: HasOneDirectiveConfiguration, ctx: TransformerContextProvider) => void;
|
10
|
+
makeBelongsToGetItemConnectionWithKeyResolver: (config: BelongsToDirectiveConfiguration, ctx: TransformerContextProvider) => void;
|
11
|
+
makeHasOneBelongToGetItemConnectionWithKeyResolver: (config: HasOneDirectiveConfiguration | BelongsToDirectiveConfiguration, ctx: TransformerContextProvider) => void;
|
10
12
|
buildKeyValueExpression: (fieldName: string, object: ObjectTypeDefinitionNode, isPartitionKey?: boolean) => Expression;
|
11
|
-
makeBelongsToGetItemConnectionWithKeyResolver: (config: HasOneDirectiveConfiguration, ctx: TransformerContextProvider) => void;
|
12
13
|
}
|
13
14
|
//# sourceMappingURL=ddb-generator.d.ts.map
|
package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ddb-generator.d.ts","sourceRoot":"","sources":["../../src/resolver/ddb-generator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAEL,UAAU,EACV,UAAU,EAsBX,MAAM,0BAA0B,CAAC;AAWlC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAExH,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAO1D,qBAAa,8BAA+B,SAAQ,2BAA2B;IAC7E,cAAc,cAAe,GAAG,EAAE,wBAAwB,MAAM,EAAE,KAAG,UAAU,CAkC7E;IAOF,4CAA4C,WAAY,6BAA6B,OAAO,0BAA0B,KAAG,IAAI,CA8H3H;IAOF,0CAA0C,
|
1
|
+
{"version":3,"file":"ddb-generator.d.ts","sourceRoot":"","sources":["../../src/resolver/ddb-generator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAEL,UAAU,EACV,UAAU,EAsBX,MAAM,0BAA0B,CAAC;AAWlC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAExH,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAO1D,qBAAa,8BAA+B,SAAQ,2BAA2B;IAC7E,cAAc,cAAe,GAAG,EAAE,wBAAwB,MAAM,EAAE,KAAG,UAAU,CAkC7E;IAOF,4CAA4C,WAAY,6BAA6B,OAAO,0BAA0B,KAAG,IAAI,CA8H3H;IAOF,0CAA0C,WAAY,4BAA4B,OAAO,0BAA0B,KAAG,IAAI,CAExH;IAEF,6CAA6C,WAAY,+BAA+B,OAAO,0BAA0B,KAAG,IAAI,CAE9H;IAEF,kDAAkD,WACxC,4BAA4B,GAAG,+BAA+B,OACjE,0BAA0B,KAC9B,IAAI,CAgHL;IAEF,uBAAuB,cAAe,MAAM,UAAU,wBAAwB,+BAA2B,UAAU,CAWjH;CACH"}
|
package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.js
CHANGED
@@ -103,6 +103,12 @@ class DDBRelationalResolverGenerator extends generator_1.RelationalResolverGener
|
|
103
103
|
ctx.resolvers.addResolver(object.name.value, field.name.value, resolver);
|
104
104
|
};
|
105
105
|
this.makeHasOneGetItemConnectionWithKeyResolver = (config, ctx) => {
|
106
|
+
this.makeHasOneBelongToGetItemConnectionWithKeyResolver(config, ctx);
|
107
|
+
};
|
108
|
+
this.makeBelongsToGetItemConnectionWithKeyResolver = (config, ctx) => {
|
109
|
+
this.makeHasOneBelongToGetItemConnectionWithKeyResolver(config, ctx);
|
110
|
+
};
|
111
|
+
this.makeHasOneBelongToGetItemConnectionWithKeyResolver = (config, ctx) => {
|
106
112
|
const { connectionFields, field, fields, object, relatedType, relatedTypeIndex } = config;
|
107
113
|
if (relatedTypeIndex.length === 0) {
|
108
114
|
throw new Error('Expected relatedType index fields to be set for connection.');
|
@@ -164,9 +170,6 @@ class DDBRelationalResolverGenerator extends generator_1.RelationalResolverGener
|
|
164
170
|
const attributeType = field ? (0, graphql_transformer_common_1.attributeTypeFromScalar)(field.type) : 'S';
|
165
171
|
return (0, graphql_mapping_template_1.ref)(`util.parseJson($util.dynamodb.toDynamoDBJson($util.${attributeType === 'S' ? 'defaultIfNullOrBlank' : 'defaultIfNull'}(${isPartitionKey ? `$${PARTITION_KEY_VALUE}` : `$ctx.source.${fieldName}`}, "${graphql_transformer_common_1.NONE_VALUE}")))`);
|
166
172
|
};
|
167
|
-
this.makeBelongsToGetItemConnectionWithKeyResolver = (config, ctx) => {
|
168
|
-
this.makeHasOneGetItemConnectionWithKeyResolver(config, ctx);
|
169
|
-
};
|
170
173
|
}
|
171
174
|
}
|
172
175
|
exports.DDBRelationalResolverGenerator = DDBRelationalResolverGenerator;
|
package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ddb-generator.js","sourceRoot":"","sources":["../../src/resolver/ddb-generator.ts"],"names":[],"mappings":";;;AAAA,oFAAmI;AAEnI,uEAyBkC;AAClC,2EASoC;AAGpC,4CAAgD;AAChD,2CAA0D;AAE1D,MAAM,cAAc,GAAG,cAAc,CAAC;AACtC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAC3C,MAAM,UAAU,GAAG,IAAA,8BAAG,EAAC,sBAAsB,CAAC,CAAC;AAC/C,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAEhD,MAAa,8BAA+B,SAAQ,uCAA2B;IAA/E;;QACE,mBAAc,GAAG,CAAC,SAAgB,EAAE,oBAA8B,EA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AAK,CAAC,IAAI,CAAC,KAAK,UAAU,CACnD,CACF,CAAC;YAEF,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAC,CAAC;YACtF,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC3E,CAAC,CAAC;QAEF,4BAAuB,GAAG,CAAC,SAAiB,EAAE,MAAgC,EAAE,cAAc,GAAG,KAAK,EAAc,EAAE;;YACpH,MAAM,KAAK,GAAG,MAAA,MAAM,CAAC,MAAM,0CAAE,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;YAGvE,MAAM,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,IAAA,oDAAuB,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;YAExE,OAAO,IAAA,8BAAG,EACR,sDAAsD,aAAa,KAAK,GAAG,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,eAAe,IACpH,cAAc,CAAC,CAAC,CAAC,IAAI,mBAAmB,EAAE,CAAC,CAAC,CAAC,eAAe,SAAS,EACvE,MAAM,uCAAU,MAAM,CACvB,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CAAA;AAxTD,wEAwTC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
+
import { BelongsToDirectiveConfiguration, HasManyDirectiveConfiguration, HasOneDirectiveConfiguration } from '../types';
|
3
|
+
import { DDBRelationalResolverGenerator } from './ddb-generator';
|
4
|
+
export declare class DDBRelationalReferencesResolverGenerator extends DDBRelationalResolverGenerator {
|
5
|
+
makeHasManyGetItemsConnectionWithKeyResolver: (config: HasManyDirectiveConfiguration, ctx: TransformerContextProvider) => void;
|
6
|
+
makeHasOneGetItemConnectionWithKeyResolver: (config: HasOneDirectiveConfiguration, ctx: TransformerContextProvider) => void;
|
7
|
+
makeBelongsToGetItemConnectionWithKeyResolver: (config: BelongsToDirectiveConfiguration, ctx: TransformerContextProvider) => void;
|
8
|
+
}
|
9
|
+
//# sourceMappingURL=ddb-references-generator.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ddb-references-generator.d.ts","sourceRoot":"","sources":["../../src/resolver/ddb-references-generator.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AA4BzF,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AACxH,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAOjE,qBAAa,wCAAyC,SAAQ,8BAA8B;IAM1F,4CAA4C,WAAY,6BAA6B,OAAO,0BAA0B,KAAG,IAAI,CAoH3H;IAEF,0CAA0C,WAAY,4BAA4B,OAAO,0BAA0B,KAAG,IAAI,CAgHxH;IAOF,6CAA6C,WAAY,+BAA+B,OAAO,0BAA0B,KAAG,IAAI,CA4G9H;CACH"}
|
@@ -0,0 +1,172 @@
|
|
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 resolvers_1 = require("../resolvers");
|
8
|
+
const ddb_generator_1 = require("./ddb-generator");
|
9
|
+
const SORT_KEY_VALUE = 'sortKeyValue';
|
10
|
+
const CONNECTION_STACK = 'ConnectionStack';
|
11
|
+
const authFilter = (0, graphql_mapping_template_1.ref)('ctx.stash.authFilter');
|
12
|
+
const PARTITION_KEY_VALUE = 'partitionKeyValue';
|
13
|
+
class DDBRelationalReferencesResolverGenerator extends ddb_generator_1.DDBRelationalResolverGenerator {
|
14
|
+
constructor() {
|
15
|
+
super(...arguments);
|
16
|
+
this.makeHasManyGetItemsConnectionWithKeyResolver = (config, ctx) => {
|
17
|
+
const { field, indexName, limit, object, references, relatedType } = config;
|
18
|
+
if (references.length < 1) {
|
19
|
+
throw new Error('references should be populated.');
|
20
|
+
}
|
21
|
+
const primaryKeyFields = (0, graphql_transformer_core_1.getPrimaryKeyFields)(object);
|
22
|
+
const table = (0, graphql_transformer_core_1.getTable)(ctx, relatedType);
|
23
|
+
const dataSourceName = (0, graphql_transformer_core_1.getModelDataSourceNameForTypeName)(ctx, relatedType.name.value);
|
24
|
+
const dataSource = ctx.api.host.getDataSource(dataSourceName);
|
25
|
+
const keySchema = (0, graphql_transformer_core_1.getKeySchema)(table, indexName);
|
26
|
+
const setup = [
|
27
|
+
(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})`)),
|
28
|
+
...primaryKeyFields
|
29
|
+
.slice(1)
|
30
|
+
.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}`)))),
|
31
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('query'), this.makeExpression(keySchema, references)),
|
32
|
+
];
|
33
|
+
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)([
|
34
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('filter'), authFilter),
|
35
|
+
(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')]) }))),
|
36
|
+
]), (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)([
|
37
|
+
(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')))),
|
38
|
+
(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)([
|
39
|
+
(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')))),
|
40
|
+
(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('filter'), (0, graphql_mapping_template_1.ref)('filterExpression')),
|
41
|
+
])),
|
42
|
+
])));
|
43
|
+
const queryArguments = {
|
44
|
+
query: (0, graphql_mapping_template_1.raw)('$util.toJson($query)'),
|
45
|
+
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)),
|
46
|
+
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)()),
|
47
|
+
limit: (0, graphql_mapping_template_1.ref)('limit'),
|
48
|
+
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)()),
|
49
|
+
};
|
50
|
+
if (indexName) {
|
51
|
+
queryArguments.index = (0, graphql_mapping_template_1.str)(indexName);
|
52
|
+
}
|
53
|
+
const queryObj = graphql_mapping_template_1.DynamoDBMappingTemplate.query(queryArguments);
|
54
|
+
const resolverResourceId = graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID(object.name.value, field.name.value);
|
55
|
+
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)([
|
56
|
+
(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))')),
|
57
|
+
(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]}`))),
|
58
|
+
(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])),
|
59
|
+
])), `${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)([(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'))), (0, graphql_mapping_template_1.raw)('$util.toJson($result)')]))), `${object.name.value}.${field.name.value}.res.vtl`));
|
60
|
+
resolver.setScope(ctx.stackManager.getScopeFor(resolverResourceId, CONNECTION_STACK));
|
61
|
+
ctx.resolvers.addResolver(object.name.value, field.name.value, resolver);
|
62
|
+
};
|
63
|
+
this.makeHasOneGetItemConnectionWithKeyResolver = (config, ctx) => {
|
64
|
+
const { field, indexName, references, object, relatedType } = config;
|
65
|
+
if (references.length < 1) {
|
66
|
+
throw new Error('references should be populated.');
|
67
|
+
}
|
68
|
+
const primaryKeyFields = (0, graphql_transformer_core_1.getPrimaryKeyFields)(object);
|
69
|
+
const dataSourceName = (0, graphql_transformer_core_1.getModelDataSourceNameForTypeName)(ctx, relatedType.name.value);
|
70
|
+
const dataSource = ctx.api.host.getDataSource(dataSourceName);
|
71
|
+
const partitionKeyName = references[0];
|
72
|
+
const totalExpressions = ['#partitionKey = :partitionValue'];
|
73
|
+
const totalExpressionNames = {
|
74
|
+
'#partitionKey': (0, graphql_mapping_template_1.str)(partitionKeyName),
|
75
|
+
};
|
76
|
+
const totalExpressionValues = {
|
77
|
+
':partitionValue': this.buildKeyValueExpression(references[0], relatedType, true),
|
78
|
+
};
|
79
|
+
if (references.length > 2) {
|
80
|
+
const rangeKeyFields = references.slice(1);
|
81
|
+
const sortKeyName = (0, resolvers_1.condenseRangeKey)(rangeKeyFields);
|
82
|
+
const condensedSortKeyValue = (0, resolvers_1.condenseRangeKey)(primaryKeyFields.slice(1).map((keyField) => `\${ctx.source.${keyField}}`));
|
83
|
+
totalExpressions.push('#sortKeyName = :sortKeyName');
|
84
|
+
totalExpressionNames['#sortKeyName'] = (0, graphql_mapping_template_1.str)(sortKeyName);
|
85
|
+
totalExpressionValues[':sortKeyName'] = (0, graphql_mapping_template_1.ref)(`util.parseJson($util.dynamodb.toDynamoDBJson($util.defaultIfNullOrBlank("${condensedSortKeyValue}", "${graphql_transformer_common_1.NONE_VALUE}")))`);
|
86
|
+
}
|
87
|
+
else if (references.length === 2) {
|
88
|
+
const sortKeyName = references[1];
|
89
|
+
totalExpressions.push('#sortKeyName = :sortKeyName');
|
90
|
+
totalExpressionNames['#sortKeyName'] = (0, graphql_mapping_template_1.str)(sortKeyName);
|
91
|
+
totalExpressionValues[':sortKeyName'] = this.buildKeyValueExpression(primaryKeyFields[1], ctx.output.getObject(object.name.value));
|
92
|
+
}
|
93
|
+
const resolverResourceId = graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID(object.name.value, field.name.value);
|
94
|
+
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)([
|
95
|
+
(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))')),
|
96
|
+
(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]}`))),
|
97
|
+
(0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.or)([
|
98
|
+
(0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.isNull'), (0, graphql_mapping_template_1.ref)(PARTITION_KEY_VALUE)),
|
99
|
+
...primaryKeyFields.slice(1).map((f) => (0, graphql_mapping_template_1.raw)(`$util.isNull($ctx.source.${f})`)),
|
100
|
+
]), (0, graphql_mapping_template_1.raw)('#return'), (0, graphql_mapping_template_1.compoundExpression)([
|
101
|
+
(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) })),
|
102
|
+
(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)({
|
103
|
+
expression: (0, graphql_mapping_template_1.str)(totalExpressions.join(' AND ')),
|
104
|
+
expressionNames: (0, graphql_mapping_template_1.obj)(totalExpressionNames),
|
105
|
+
expressionValues: (0, graphql_mapping_template_1.obj)(totalExpressionValues),
|
106
|
+
}))),
|
107
|
+
(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))))),
|
108
|
+
(0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('GetRequest')),
|
109
|
+
])),
|
110
|
+
])), `${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.toJson)((0, graphql_mapping_template_1.ref)('ctx.result.items[0]')), (0, graphql_mapping_template_1.compoundExpression)([
|
111
|
+
(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()')),
|
112
|
+
(0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.nul)()),
|
113
|
+
])))), `${object.name.value}.${field.name.value}.res.vtl`));
|
114
|
+
resolver.setScope(ctx.stackManager.getScopeFor(resolverResourceId, CONNECTION_STACK));
|
115
|
+
ctx.resolvers.addResolver(object.name.value, field.name.value, resolver);
|
116
|
+
};
|
117
|
+
this.makeBelongsToGetItemConnectionWithKeyResolver = (config, ctx) => {
|
118
|
+
const { field, references, object, relatedType } = config;
|
119
|
+
const table = (0, graphql_transformer_core_1.getTable)(ctx, relatedType);
|
120
|
+
const { keySchema } = table;
|
121
|
+
const dataSourceName = (0, graphql_transformer_core_1.getModelDataSourceNameForTypeName)(ctx, relatedType.name.value);
|
122
|
+
const dataSource = ctx.api.host.getDataSource(dataSourceName);
|
123
|
+
const partitionKeyName = keySchema[0].attributeName;
|
124
|
+
const totalExpressions = ['#partitionKey = :partitionValue'];
|
125
|
+
const totalExpressionNames = {
|
126
|
+
'#partitionKey': (0, graphql_mapping_template_1.str)(partitionKeyName),
|
127
|
+
};
|
128
|
+
const totalExpressionValues = {
|
129
|
+
':partitionValue': this.buildKeyValueExpression(references[0], ctx.output.getObject(object.name.value), true),
|
130
|
+
};
|
131
|
+
if (references.length > 2) {
|
132
|
+
const rangeKeyFields = references.slice(1);
|
133
|
+
const sortKeyName = keySchema[1].attributeName;
|
134
|
+
const condensedSortKeyValue = (0, resolvers_1.condenseRangeKey)(rangeKeyFields.map((keyField) => `\${ctx.source.${keyField}}`));
|
135
|
+
totalExpressions.push('#sortKeyName = :sortKeyName');
|
136
|
+
totalExpressionNames['#sortKeyName'] = (0, graphql_mapping_template_1.str)(sortKeyName);
|
137
|
+
totalExpressionValues[':sortKeyName'] = (0, graphql_mapping_template_1.ref)(`util.parseJson($util.dynamodb.toDynamoDBJson($util.defaultIfNullOrBlank("${condensedSortKeyValue}", "${graphql_transformer_common_1.NONE_VALUE}")))`);
|
138
|
+
}
|
139
|
+
else if (references.length === 2) {
|
140
|
+
const sortKeyName = keySchema[1].attributeName;
|
141
|
+
totalExpressions.push('#sortKeyName = :sortKeyName');
|
142
|
+
totalExpressionNames['#sortKeyName'] = (0, graphql_mapping_template_1.str)(sortKeyName);
|
143
|
+
totalExpressionValues[':sortKeyName'] = this.buildKeyValueExpression(references[1], ctx.output.getObject(object.name.value));
|
144
|
+
}
|
145
|
+
const resolverResourceId = graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID(object.name.value, field.name.value);
|
146
|
+
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)([
|
147
|
+
(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))')),
|
148
|
+
(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]}`))),
|
149
|
+
(0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.or)([
|
150
|
+
(0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.isNull'), (0, graphql_mapping_template_1.ref)(PARTITION_KEY_VALUE)),
|
151
|
+
...references.slice(1).map((f) => (0, graphql_mapping_template_1.raw)(`$util.isNull($ctx.source.${f})`)),
|
152
|
+
]), (0, graphql_mapping_template_1.raw)('#return'), (0, graphql_mapping_template_1.compoundExpression)([
|
153
|
+
(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') })),
|
154
|
+
(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)({
|
155
|
+
expression: (0, graphql_mapping_template_1.str)(totalExpressions.join(' AND ')),
|
156
|
+
expressionNames: (0, graphql_mapping_template_1.obj)(totalExpressionNames),
|
157
|
+
expressionValues: (0, graphql_mapping_template_1.obj)(totalExpressionValues),
|
158
|
+
}))),
|
159
|
+
(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))))),
|
160
|
+
(0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('GetRequest')),
|
161
|
+
])),
|
162
|
+
])), `${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.toJson)((0, graphql_mapping_template_1.ref)('ctx.result.items[0]')), (0, graphql_mapping_template_1.compoundExpression)([
|
163
|
+
(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()')),
|
164
|
+
(0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.nul)()),
|
165
|
+
])))), `${object.name.value}.${field.name.value}.res.vtl`));
|
166
|
+
resolver.setScope(ctx.stackManager.getScopeFor(resolverResourceId, CONNECTION_STACK));
|
167
|
+
ctx.resolvers.addResolver(object.name.value, field.name.value, resolver);
|
168
|
+
};
|
169
|
+
}
|
170
|
+
}
|
171
|
+
exports.DDBRelationalReferencesResolverGenerator = DDBRelationalReferencesResolverGenerator;
|
172
|
+
//# sourceMappingURL=ddb-references-generator.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ddb-references-generator.js","sourceRoot":"","sources":["../../src/resolver/ddb-references-generator.ts"],"names":[],"mappings":";;;AAAA,oFAM+C;AAE/C,uEAwBkC;AAClC,2EAAsF;AACtF,4CAAgD;AAEhD,mDAAiE;AAEjE,MAAM,cAAc,GAAG,cAAc,CAAC;AACtC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAC3C,MAAM,UAAU,GAAG,IAAA,8BAAG,EAAC,sBAAsB,CAAC,CAAC;AAC/C,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAEhD,MAAa,wCAAyC,SAAQ,8CAA8B;IAA5F;;QAME,iDAA4C,GAAG,CAAC,MAAqC,EAAE,GAA+B,EAAQ,EAAE;YAC9H,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;YAE5E,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;gBAEzB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;aACpD;YA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AK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC3E,CAAC,CAAC;IACJ,CAAC;CAAA;AAhWD,4FAgWC"}
|
package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator.d.ts
CHANGED
@@ -2,7 +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"}
|
@@ -1,5 +1,6 @@
|
|
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;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../src/resolvers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,qCAAqC,EAAE,MAAM,6CAA6C,CAAC;AAKhI,OAAO,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;
|
1
|
+
{"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../src/resolvers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,qCAAqC,EAAE,MAAM,6CAA6C,CAAC;AAKhI,OAAO,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAetF,eAAO,MAAM,kCAAkC,WACrC,6BAA6B,GAAG,4BAA4B,OAC/D,0BAA0B,KAC9B,IAkDF,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"}
|