Socket
Socket
Sign inDemoInstall

@aws-amplify/graphql-relational-transformer

Package Overview
Dependencies
Maintainers
8
Versions
413
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-amplify/graphql-relational-transformer - npm Package Compare versions

Comparing version 0.6.16-sub-identity-claim.1 to 0.6.16

17

CHANGELOG.md

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc