@aws-amplify/graphql-maps-to-transformer
Advanced tools
Comparing version 4.0.4-ai.0 to 4.0.4-ai.1
@@ -6,2 +6,6 @@ # Change Log | ||
## [4.0.4-ai.1](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-maps-to-transformer@4.0.4-ai.0...@aws-amplify/graphql-maps-to-transformer@4.0.4-ai.1) (2024-09-26) | ||
**Note:** Version bump only for package @aws-amplify/graphql-maps-to-transformer | ||
## [4.0.4-ai.0](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-maps-to-transformer@4.0.3...@aws-amplify/graphql-maps-to-transformer@4.0.4-ai.0) (2024-09-20) | ||
@@ -8,0 +12,0 @@ |
@@ -8,11 +8,11 @@ "use strict"; | ||
const attachInputMappingSlot = ({ resolver, resolverTypeName, resolverFieldName, fieldMap }) => { | ||
resolver.addToSlot('preUpdate', graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([createMultiRemapExpression('ctx.args.input', fieldMap, 'CURR_TO_ORIG'), (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.raw)('{}'))])), `${resolverTypeName}.${resolverFieldName}.{slotName}.{slotIndex}.req.vtl`)); | ||
resolver.addVtlFunctionToSlot('preUpdate', graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([createMultiRemapExpression('ctx.args.input', fieldMap, 'CURR_TO_ORIG'), (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.raw)('{}'))])), `${resolverTypeName}.${resolverFieldName}.{slotName}.{slotIndex}.req.vtl`)); | ||
}; | ||
exports.attachInputMappingSlot = attachInputMappingSlot; | ||
const attachFieldMappingSlot = ({ resolver, resolverTypeName, resolverFieldName, fieldMap }) => { | ||
resolver.addToSlot('preAuth', graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([createFieldMapExpression(fieldMap), (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.raw)('{}'))])), `${resolverTypeName}.${resolverFieldName}.{slotName}.{slotIndex}.req.vtl`)); | ||
resolver.addVtlFunctionToSlot('preAuth', graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([createFieldMapExpression(fieldMap), (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.raw)('{}'))])), `${resolverTypeName}.${resolverFieldName}.{slotName}.{slotIndex}.req.vtl`)); | ||
}; | ||
exports.attachFieldMappingSlot = attachFieldMappingSlot; | ||
const attachResponseMappingSlot = ({ slotName, resolver, resolverFieldName, resolverTypeName, fieldMap, isList, }) => { | ||
resolver.addToSlot(slotName, undefined, graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([ | ||
resolver.addVtlFunctionToSlot(slotName, undefined, graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([ | ||
isList | ||
@@ -31,3 +31,3 @@ ? createListRemapExpression('ctx.prev.result.items', fieldMap, 'ORIG_TO_CURR') | ||
const fieldMapRef = (0, graphql_mapping_template_1.ref)('fieldMap'); | ||
resolver.addToSlot(slotName, graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([ | ||
resolver.addVtlFunctionToSlot(slotName, graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([ | ||
(0, graphql_mapping_template_1.set)(fieldMapRef, (0, graphql_mapping_template_1.raw)(JSON.stringify(fieldMapVtl))), | ||
@@ -34,0 +34,0 @@ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.or)([(0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.isNull'), fieldMapRef), (0, graphql_mapping_template_1.raw)('$fieldMap.keySet().size() <= 0')]), (0, graphql_mapping_template_1.ret)((0, graphql_mapping_template_1.ref)('ctx.args'))), |
{ | ||
"name": "@aws-amplify/graphql-maps-to-transformer", | ||
"version": "4.0.4-ai.0", | ||
"version": "4.0.4-ai.1", | ||
"description": "Amplify GraphQL @mapsTo transformer", | ||
@@ -35,4 +35,4 @@ "repository": { | ||
"@aws-amplify/graphql-directives": "2.2.1-ai.0", | ||
"@aws-amplify/graphql-transformer-core": "3.1.2-ai.0", | ||
"@aws-amplify/graphql-transformer-interfaces": "4.1.0", | ||
"@aws-amplify/graphql-transformer-core": "3.1.2-ai.1", | ||
"@aws-amplify/graphql-transformer-interfaces": "4.1.1-ai.0", | ||
"graphql-mapping-template": "5.0.1", | ||
@@ -46,7 +46,7 @@ "graphql-transformer-common": "5.0.1" | ||
"devDependencies": { | ||
"@aws-amplify/graphql-index-transformer": "3.0.4-ai.0", | ||
"@aws-amplify/graphql-model-transformer": "3.0.4-ai.0", | ||
"@aws-amplify/graphql-relational-transformer": "3.0.4-ai.0", | ||
"@aws-amplify/graphql-searchable-transformer": "3.0.4-ai.0", | ||
"@aws-amplify/graphql-transformer-test-utils": "1.0.3-ai.0", | ||
"@aws-amplify/graphql-index-transformer": "3.0.4-ai.1", | ||
"@aws-amplify/graphql-model-transformer": "3.0.4-ai.1", | ||
"@aws-amplify/graphql-relational-transformer": "3.0.4-ai.1", | ||
"@aws-amplify/graphql-searchable-transformer": "3.0.4-ai.1", | ||
"@aws-amplify/graphql-transformer-test-utils": "1.0.3-ai.1", | ||
"graphql": "^15.5.0" | ||
@@ -91,3 +91,3 @@ }, | ||
}, | ||
"gitHead": "a83e8f0bb457defb766303db7e993b27b5af42b7" | ||
"gitHead": "6852fafdfead1bdb4dfe0d75886cd5419d989c0f" | ||
} |
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
116534
80
+ Added@aws-amplify/graphql-transformer-core@3.1.2-ai.1(transitive)
+ Added@aws-amplify/graphql-transformer-interfaces@4.1.1-ai.0(transitive)
+ Addedaws-cdk-lib@2.173.1(transitive)
- Removed@aws-amplify/graphql-transformer-core@3.1.2-ai.0(transitive)
- Removed@aws-amplify/graphql-transformer-interfaces@4.1.0(transitive)
- Removedaws-cdk-lib@2.173.0(transitive)
Updated@aws-amplify/graphql-transformer-interfaces@4.1.1-ai.0