@aws-amplify/graphql-relational-transformer
Advanced tools
Comparing version 0.6.16-sub-identity-claim.1 to 0.6.16
@@ -6,3 +6,3 @@ # Change Log | ||
## [0.6.16-sub-identity-claim.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-relational-transformer@0.6.15...@aws-amplify/graphql-relational-transformer@0.6.16-sub-identity-claim.1) (2022-01-12) | ||
## [0.6.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-relational-transformer@0.6.15...@aws-amplify/graphql-relational-transformer@0.6.16) (2022-01-13) | ||
@@ -12,3 +12,5 @@ | ||
* add feature flag to use sub as default identity claim ([80516bd](https://github.com/aws-amplify/amplify-cli/commit/80516bd9aa449b5f5243cfe326ba62b84f03d478)) | ||
* clean up missing and unused GraphQL v2 dependencies ([#9486](https://github.com/aws-amplify/amplify-cli/issues/9486)) ([a6ca44e](https://github.com/aws-amplify/amplify-cli/commit/a6ca44e6ea0ec0a70b648e399fc3e849ccc2a7c9)) | ||
* **graphql:** modify fields match logic for hasOne directive when using auth directive ([#9459](https://github.com/aws-amplify/amplify-cli/issues/9459)) ([a924892](https://github.com/aws-amplify/amplify-cli/commit/a92489298625d46255263d50bbceb074eb6d2269)) | ||
* use StackMapping for V2 resolvers ([#9238](https://github.com/aws-amplify/amplify-cli/issues/9238)) ([d354e78](https://github.com/aws-amplify/amplify-cli/commit/d354e78dd1e253d9572da3b08a4d8883e2fe673e)) | ||
@@ -19,13 +21,2 @@ | ||
## [0.6.16-sub-identity-claim.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-relational-transformer@0.6.15...@aws-amplify/graphql-relational-transformer@0.6.16-sub-identity-claim.0) (2022-01-12) | ||
### Bug Fixes | ||
* add feature flag to use sub as default identity claim ([80516bd](https://github.com/aws-amplify/amplify-cli/commit/80516bd9aa449b5f5243cfe326ba62b84f03d478)) | ||
## [0.6.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-relational-transformer@0.6.13...@aws-amplify/graphql-relational-transformer@0.6.15) (2022-01-10) | ||
@@ -32,0 +23,0 @@ |
@@ -69,3 +69,4 @@ "use strict"; | ||
} | ||
const resolver = ctx.resolvers.generateQueryResolver(object.name.value, field.name.value, graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID(object.name.value, field.name.value), dataSource, graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([ | ||
const resolverResourceId = graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID(object.name.value, field.name.value); | ||
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)([ | ||
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('ctx.source.deniedField'), (0, graphql_mapping_template_1.raw)(`#return($util.toJson(null))`)), | ||
@@ -86,3 +87,3 @@ (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.or)(localFields.map(f => (0, graphql_mapping_template_1.raw)(`$util.isNull($ctx.source.${f})`))), (0, graphql_mapping_template_1.raw)('#return'), (0, graphql_mapping_template_1.compoundExpression)([ | ||
])))), `${object.name.value}.${field.name.value}.res.vtl`)); | ||
resolver.mapToStack(getConnectionStack(ctx)); | ||
resolver.mapToStack(ctx.stackManager.getStackFor(resolverResourceId, CONNECTION_STACK)); | ||
ctx.resolvers.addResolver(object.name.value, field.name.value, resolver); | ||
@@ -134,7 +135,8 @@ } | ||
const queryObj = graphql_mapping_template_1.DynamoDBMappingTemplate.query(queryArguments); | ||
const resolver = ctx.resolvers.generateQueryResolver(object.name.value, field.name.value, graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID(object.name.value, field.name.value), dataSource, graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([ | ||
const resolverResourceId = graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID(object.name.value, field.name.value); | ||
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)([ | ||
(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('ctx.source.deniedField'), (0, graphql_mapping_template_1.raw)(`#return($util.toJson(null))`)), | ||
(0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.raw)(`$util.isNull($ctx.source.${connectionAttributes[0]})`), (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])), | ||
])), `${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`)); | ||
resolver.mapToStack(getConnectionStack(ctx)); | ||
resolver.mapToStack(ctx.stackManager.getStackFor(resolverResourceId, CONNECTION_STACK)); | ||
ctx.resolvers.addResolver(object.name.value, field.name.value, resolver); | ||
@@ -232,8 +234,2 @@ } | ||
} | ||
function getConnectionStack(ctx) { | ||
if (ctx.stackManager.hasStack(CONNECTION_STACK)) { | ||
return ctx.stackManager.getStack(CONNECTION_STACK); | ||
} | ||
return ctx.stackManager.createStack(CONNECTION_STACK); | ||
} | ||
//# sourceMappingURL=resolvers.js.map |
{ | ||
"name": "@aws-amplify/graphql-relational-transformer", | ||
"version": "0.6.16-sub-identity-claim.1", | ||
"version": "0.6.16", | ||
"description": "Amplify GraphQL relational modeling transformers", | ||
@@ -30,7 +30,7 @@ "repository": { | ||
"dependencies": { | ||
"@aws-amplify/graphql-auth-transformer": "0.5.8-sub-identity-claim.1", | ||
"@aws-amplify/graphql-index-transformer": "0.8.5", | ||
"@aws-amplify/graphql-model-transformer": "0.10.5", | ||
"@aws-amplify/graphql-transformer-core": "0.15.4", | ||
"@aws-amplify/graphql-transformer-interfaces": "1.12.5", | ||
"@aws-amplify/graphql-auth-transformer": "0.5.8", | ||
"@aws-amplify/graphql-index-transformer": "0.8.6", | ||
"@aws-amplify/graphql-model-transformer": "0.10.6", | ||
"@aws-amplify/graphql-transformer-core": "0.15.5", | ||
"@aws-amplify/graphql-transformer-interfaces": "1.12.6", | ||
"@aws-cdk/aws-appsync": "~1.124.0", | ||
@@ -41,7 +41,4 @@ "@aws-cdk/aws-dynamodb": "~1.124.0", | ||
"graphql-mapping-template": "4.20.3", | ||
"graphql-transformer-common": "4.22.4" | ||
"graphql-transformer-common": "4.22.5" | ||
}, | ||
"devDependencies": { | ||
"@aws-cdk/assert": "~1.124.0" | ||
}, | ||
"jest": { | ||
@@ -62,3 +59,3 @@ "transform": { | ||
}, | ||
"gitHead": "74134237d28d9247dadb0c8ec14e919609c8a34f" | ||
"gitHead": "8c2e0124818cfe9cc7851c66319cc4faff7c816b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
0
153672
1219
+ Added@aws-amplify/graphql-auth-transformer@0.5.8(transitive)
+ Added@aws-amplify/graphql-index-transformer@0.8.6(transitive)
+ Added@aws-amplify/graphql-model-transformer@0.10.6(transitive)
+ Added@aws-amplify/graphql-transformer-core@0.15.5(transitive)
+ Added@aws-amplify/graphql-transformer-interfaces@1.12.6(transitive)
+ Addedgraphql-transformer-common@4.22.5(transitive)
- Removed@aws-amplify/graphql-auth-transformer@0.5.8-sub-identity-claim.1(transitive)
- Removed@aws-amplify/graphql-index-transformer@0.8.5(transitive)
- Removed@aws-amplify/graphql-model-transformer@0.10.5(transitive)
- Removed@aws-amplify/graphql-transformer-core@0.15.4(transitive)
- Removed@aws-amplify/graphql-transformer-interfaces@1.12.5(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedcamel-case@4.1.2(transitive)
- Removedcapital-case@1.0.4(transitive)
- Removedchange-case@4.1.2(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedconstant-case@3.0.4(transitive)
- Removeddeep-diff@1.0.2(transitive)
- Removeddot-case@3.0.4(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedgraphql-transformer-common@4.22.4(transitive)
- Removedheader-case@2.0.4(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedlower-case@2.0.2(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedno-case@3.0.4(transitive)
- Removedonce@1.4.0(transitive)
- Removedparam-case@3.0.4(transitive)
- Removedpascal-case@3.1.2(transitive)
- Removedpath-case@3.0.4(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedsentence-case@3.0.4(transitive)
- Removedsnake-case@3.0.4(transitive)
- Removedtslib@2.7.0(transitive)
- Removedupper-case@2.0.2(transitive)
- Removedupper-case-first@2.0.2(transitive)
- Removedwrappy@1.0.2(transitive)