@aws-amplify/graphql-model-transformer 0.9.3-beta.0 → 0.9.5-apiext5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +26 -3
  2. package/lib/definitions.d.ts +1 -0
  3. package/lib/definitions.d.ts.map +1 -1
  4. package/lib/definitions.js +2 -1
  5. package/lib/definitions.js.map +1 -1
  6. package/lib/graphql-model-transformer.d.ts +2 -1
  7. package/lib/graphql-model-transformer.d.ts.map +1 -1
  8. package/lib/graphql-model-transformer.js +137 -85
  9. package/lib/graphql-model-transformer.js.map +1 -1
  10. package/lib/graphql-types/common.d.ts +7 -3
  11. package/lib/graphql-types/common.d.ts.map +1 -1
  12. package/lib/graphql-types/common.js +86 -22
  13. package/lib/graphql-types/common.js.map +1 -1
  14. package/lib/graphql-types/mutation.js +14 -14
  15. package/lib/graphql-types/mutation.js.map +1 -1
  16. package/lib/graphql-types/query.js +6 -6
  17. package/lib/graphql-types/query.js.map +1 -1
  18. package/lib/resolvers/common.d.ts +1 -1
  19. package/lib/resolvers/common.d.ts.map +1 -1
  20. package/lib/resolvers/common.js +20 -21
  21. package/lib/resolvers/common.js.map +1 -1
  22. package/lib/resolvers/mutation.js +128 -128
  23. package/lib/resolvers/mutation.js.map +1 -1
  24. package/lib/resolvers/query.js +69 -69
  25. package/lib/resolvers/query.js.map +1 -1
  26. package/lib/resolvers/subscriptions.js +4 -4
  27. package/lib/resolvers/subscriptions.js.map +1 -1
  28. package/package.json +10 -7
  29. package/src/__tests__/__snapshots__/model-transformer-override.test.ts.snap +3009 -0
  30. package/src/__tests__/__snapshots__/model-transformer.test.ts.snap +3 -3
  31. package/src/__tests__/model-transformer-override.test.ts +41 -0
  32. package/src/__tests__/model-transformer.test.ts +132 -37
  33. package/src/__tests__/overrides/build/override.js +8 -0
  34. package/src/definitions.ts +2 -0
  35. package/src/graphql-model-transformer.ts +81 -9
  36. package/src/graphql-types/common.ts +98 -2
  37. package/src/graphql-types/mutation.ts +1 -1
  38. package/src/graphql-types/query.ts +1 -1
  39. package/src/resolvers/common.ts +1 -3
  40. package/tsconfig.tsbuildinfo +1 -1
  41. package/lib/wrappers/object-definition-wrapper.d.ts +0 -77
  42. package/lib/wrappers/object-definition-wrapper.d.ts.map +0 -1
  43. package/lib/wrappers/object-definition-wrapper.js +0 -354
  44. package/lib/wrappers/object-definition-wrapper.js.map +0 -1
  45. package/src/wrappers/object-definition-wrapper.ts +0 -447
@@ -6,48 +6,47 @@ const definitions_1 = require("../definitions");
6
6
  const API_KEY = 'API Key Authorization';
7
7
  const generateConditionSlot = (inputConditionObjectName, conditionOutputVariableName) => {
8
8
  const statements = [
9
- graphql_mapping_template_1.comment('Start condition block'),
10
- graphql_mapping_template_1.iff(graphql_mapping_template_1.and([graphql_mapping_template_1.ref(inputConditionObjectName), graphql_mapping_template_1.notEquals(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref(`${inputConditionObjectName}.size`)), graphql_mapping_template_1.int(0))]), graphql_mapping_template_1.compoundExpression([
11
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('mergedConditions'), graphql_mapping_template_1.obj({ and: graphql_mapping_template_1.ref(inputConditionObjectName) })),
12
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref(conditionOutputVariableName), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.parseJson'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.transform.toDynamoDBConditionExpression'), graphql_mapping_template_1.ref('mergedConditions')))),
13
- graphql_mapping_template_1.iff(graphql_mapping_template_1.and([
14
- graphql_mapping_template_1.ref(`${conditionOutputVariableName}.expressionValues`),
15
- graphql_mapping_template_1.equals(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref(`${conditionOutputVariableName}.expressionValues.size`)), graphql_mapping_template_1.int(0)),
16
- ]), graphql_mapping_template_1.set(graphql_mapping_template_1.ref(conditionOutputVariableName), graphql_mapping_template_1.obj({
17
- expression: graphql_mapping_template_1.ref(`${conditionOutputVariableName}.expression`),
18
- expressionNames: graphql_mapping_template_1.ref(`${conditionOutputVariableName}.expressionNames`),
9
+ (0, graphql_mapping_template_1.comment)('Start condition block'),
10
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.and)([(0, graphql_mapping_template_1.ref)(inputConditionObjectName), (0, graphql_mapping_template_1.notEquals)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)(`${inputConditionObjectName}.size`)), (0, graphql_mapping_template_1.int)(0))]), (0, graphql_mapping_template_1.compoundExpression)([
11
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('mergedConditions'), (0, graphql_mapping_template_1.obj)({ and: (0, graphql_mapping_template_1.ref)(inputConditionObjectName) })),
12
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(conditionOutputVariableName), (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.toDynamoDBConditionExpression'), (0, graphql_mapping_template_1.ref)('mergedConditions')))),
13
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.and)([
14
+ (0, graphql_mapping_template_1.ref)(`${conditionOutputVariableName}.expressionValues`),
15
+ (0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)(`${conditionOutputVariableName}.expressionValues.size`)), (0, graphql_mapping_template_1.int)(0)),
16
+ ]), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(conditionOutputVariableName), (0, graphql_mapping_template_1.obj)({
17
+ expression: (0, graphql_mapping_template_1.ref)(`${conditionOutputVariableName}.expression`),
18
+ expressionNames: (0, graphql_mapping_template_1.ref)(`${conditionOutputVariableName}.expressionNames`),
19
19
  }))),
20
- graphql_mapping_template_1.comment('End condition block'),
20
+ (0, graphql_mapping_template_1.comment)('End condition block'),
21
21
  ])),
22
22
  ];
23
- return graphql_mapping_template_1.compoundExpression(statements);
23
+ return (0, graphql_mapping_template_1.compoundExpression)(statements);
24
24
  };
25
25
  exports.generateConditionSlot = generateConditionSlot;
26
26
  const generateDefaultResponseMappingTemplate = (isSyncEnabled, mutation = false) => {
27
27
  const statements = [];
28
28
  if (mutation)
29
- statements.push(graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('ctx.result.put'), graphql_mapping_template_1.str(definitions_1.OPERATION_KEY), graphql_mapping_template_1.str('Mutation'))));
29
+ statements.push((0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.result.put'), (0, graphql_mapping_template_1.str)(definitions_1.OPERATION_KEY), (0, graphql_mapping_template_1.str)('Mutation'))));
30
30
  if (isSyncEnabled) {
31
- statements.push(graphql_mapping_template_1.ifElse(graphql_mapping_template_1.ref('ctx.error'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.error'), graphql_mapping_template_1.ref('ctx.error.message'), graphql_mapping_template_1.ref('ctx.error.type'), graphql_mapping_template_1.ref('ctx.result')), graphql_mapping_template_1.toJson(graphql_mapping_template_1.ref('ctx.result'))));
31
+ statements.push((0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.ref)('ctx.error'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.error'), (0, graphql_mapping_template_1.ref)('ctx.error.message'), (0, graphql_mapping_template_1.ref)('ctx.error.type'), (0, graphql_mapping_template_1.ref)('ctx.result')), (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('ctx.result'))));
32
32
  }
33
33
  else {
34
- statements.push(graphql_mapping_template_1.ifElse(graphql_mapping_template_1.ref('ctx.error'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.error'), graphql_mapping_template_1.ref('ctx.error.message'), graphql_mapping_template_1.ref('ctx.error.type')), graphql_mapping_template_1.toJson(graphql_mapping_template_1.ref('ctx.result'))));
34
+ statements.push((0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.ref)('ctx.error'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.error'), (0, graphql_mapping_template_1.ref)('ctx.error.message'), (0, graphql_mapping_template_1.ref)('ctx.error.type')), (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('ctx.result'))));
35
35
  }
36
- return graphql_mapping_template_1.printBlock('ResponseTemplate')(graphql_mapping_template_1.compoundExpression(statements));
36
+ return (0, graphql_mapping_template_1.printBlock)('ResponseTemplate')((0, graphql_mapping_template_1.compoundExpression)(statements));
37
37
  };
38
38
  exports.generateDefaultResponseMappingTemplate = generateDefaultResponseMappingTemplate;
39
39
  const generateResolverKey = (typeName, fieldName) => {
40
40
  return `${typeName}.${fieldName}`;
41
41
  };
42
42
  exports.generateResolverKey = generateResolverKey;
43
- const generateAuthExpressionForSandboxMode = (ctx) => {
44
- const enabled = ctx.resourceHelper.api.sandboxModeEnabled;
43
+ const generateAuthExpressionForSandboxMode = (enabled) => {
45
44
  let exp;
46
45
  if (enabled)
47
- exp = graphql_mapping_template_1.iff(graphql_mapping_template_1.notEquals(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.authType')), graphql_mapping_template_1.str(API_KEY)), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.unauthorized')));
46
+ exp = (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.notEquals)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.authType')), (0, graphql_mapping_template_1.str)(API_KEY)), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.unauthorized')));
48
47
  else
49
- exp = graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.unauthorized'));
50
- return graphql_mapping_template_1.printBlock(`Sandbox Mode ${enabled ? 'Enabled' : 'Disabled'}`)(graphql_mapping_template_1.compoundExpression([graphql_mapping_template_1.iff(graphql_mapping_template_1.not(graphql_mapping_template_1.ref('ctx.stash.get("hasAuth")')), exp), graphql_mapping_template_1.toJson(graphql_mapping_template_1.obj({}))]));
48
+ exp = (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.unauthorized'));
49
+ return (0, graphql_mapping_template_1.printBlock)(`Sandbox Mode ${enabled ? 'Enabled' : 'Disabled'}`)((0, graphql_mapping_template_1.compoundExpression)([(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.ref)('ctx.stash.get("hasAuth")')), exp), (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.obj)({}))]));
51
50
  };
52
51
  exports.generateAuthExpressionForSandboxMode = generateAuthExpressionForSandboxMode;
53
52
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/resolvers/common.ts"],"names":[],"mappings":";;;AAAA,uEAoBkC;AAClC,gDAA+C;AAE/C,MAAM,OAAO,GAAG,uBAAuB,CAAC;AAQjC,MAAM,qBAAqB,GAAG,CAAC,wBAAgC,EAAE,2BAAmC,EAA0B,EAAE;IACrI,MAAM,UAAU,GAAiB;QAC/B,kCAAO,CAAC,uBAAuB,CAAC;QAEhC,8BAAG,CACD,8BAAG,CAAC,CAAC,8BAAG,CAAC,wBAAwB,CAAC,EAAE,oCAAS,CAAC,qCAAU,CAAC,8BAAG,CAAC,GAAG,wBAAwB,OAAO,CAAC,CAAC,EAAE,8BAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC5G,6CAAkB,CAAC;YACjB,8BAAG,CAAC,8BAAG,CAAC,kBAAkB,CAAC,EAAE,8BAAG,CAAC,EAAE,GAAG,EAAE,8BAAG,CAAC,wBAAwB,CAAC,EAAE,CAAC,CAAC;YACzE,8BAAG,CACD,8BAAG,CAAC,2BAA2B,CAAC,EAChC,qCAAU,CAAC,8BAAG,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C,EAAE,GAAG,CAAC,EAAE,IAAA,iCAAM,EAAC,IAAA,8BAAG,EAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CACtF,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,oCAAoC,wCAS/C"}
@@ -5,201 +5,201 @@ const graphql_mapping_template_1 = require("graphql-mapping-template");
5
5
  const common_1 = require("./common");
6
6
  const generateUpdateRequestTemplate = (modelName, isSyncEnabled) => {
7
7
  const objectKeyVariable = 'ctx.stash.metadata.modelObjectKey';
8
- const keyFields = [graphql_mapping_template_1.str('id')];
8
+ const keyFields = [(0, graphql_mapping_template_1.str)('id')];
9
9
  if (isSyncEnabled) {
10
- keyFields.push(graphql_mapping_template_1.str('_version'));
11
- keyFields.push(graphql_mapping_template_1.str('_deleted'));
12
- keyFields.push(graphql_mapping_template_1.str('_lastChangedAt'));
10
+ keyFields.push((0, graphql_mapping_template_1.str)('_version'));
11
+ keyFields.push((0, graphql_mapping_template_1.str)('_deleted'));
12
+ keyFields.push((0, graphql_mapping_template_1.str)('_lastChangedAt'));
13
13
  }
14
14
  const statements = [
15
- graphql_mapping_template_1.comment('Set the default values to put request'),
16
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('mergedValues'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.defaultIfNull'), graphql_mapping_template_1.ref('ctx.stash.defaultValues'), graphql_mapping_template_1.obj({}))),
17
- graphql_mapping_template_1.comment('copy the values from input'),
18
- graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('mergedValues.putAll'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.defaultIfNull'), graphql_mapping_template_1.ref('ctx.args.input'), graphql_mapping_template_1.obj({})))),
19
- graphql_mapping_template_1.comment('set the typename'),
20
- graphql_mapping_template_1.comment('Initialize the vars for creating ddb expression'),
21
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expNames'), graphql_mapping_template_1.obj({})),
22
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expValues'), graphql_mapping_template_1.obj({})),
23
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expSet'), graphql_mapping_template_1.obj({})),
24
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expAdd'), graphql_mapping_template_1.obj({})),
25
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expRemove'), graphql_mapping_template_1.list([])),
26
- graphql_mapping_template_1.ifElse(graphql_mapping_template_1.ref(objectKeyVariable), graphql_mapping_template_1.set(graphql_mapping_template_1.ref('Key'), graphql_mapping_template_1.ref(objectKeyVariable)), graphql_mapping_template_1.set(graphql_mapping_template_1.ref('Key'), graphql_mapping_template_1.obj({ id: graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.dynamodb.toDynamoDB'), graphql_mapping_template_1.ref('ctx.args.input.id')) }))),
27
- graphql_mapping_template_1.comment('Model key'),
28
- graphql_mapping_template_1.ifElse(graphql_mapping_template_1.ref(objectKeyVariable), graphql_mapping_template_1.compoundExpression([
29
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('keyFields'), isSyncEnabled ? graphql_mapping_template_1.list([graphql_mapping_template_1.str('_version'), graphql_mapping_template_1.str('_deleted'), graphql_mapping_template_1.str('_lastChangedAt')]) : graphql_mapping_template_1.list([])),
30
- graphql_mapping_template_1.forEach(graphql_mapping_template_1.ref('entry'), graphql_mapping_template_1.ref(`${objectKeyVariable}.entrySet()`), [graphql_mapping_template_1.qref('$keyFields.add("$entry.key")')]),
31
- ]), graphql_mapping_template_1.set(graphql_mapping_template_1.ref('keyFields'), graphql_mapping_template_1.list(keyFields))),
32
- graphql_mapping_template_1.forEach(graphql_mapping_template_1.ref('entry'), graphql_mapping_template_1.ref(`util.map.copyAndRemoveAllKeys($mergedValues, $keyFields).entrySet()`), [
33
- graphql_mapping_template_1.ifElse(graphql_mapping_template_1.raw('!$util.isNull($ctx.stash.metadata.dynamodbNameOverrideMap) && $ctx.stash.metadata.dynamodbNameOverrideMap.containsKey("$entry.key")'), graphql_mapping_template_1.set(graphql_mapping_template_1.ref('entryKeyAttributeName'), graphql_mapping_template_1.raw('$ctx.stash.metadata.dynamodbNameOverrideMap.get("$entry.key")')), graphql_mapping_template_1.set(graphql_mapping_template_1.ref('entryKeyAttributeName'), graphql_mapping_template_1.raw('$entry.key'))),
34
- graphql_mapping_template_1.ifElse(graphql_mapping_template_1.ref('util.isNull($entry.value)'), graphql_mapping_template_1.compoundExpression([
35
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('discard'), graphql_mapping_template_1.ref(`expRemove.add("#$entryKeyAttributeName")`)),
36
- graphql_mapping_template_1.qref(`$expNames.put("#$entryKeyAttributeName", "$entry.key")`),
37
- ]), graphql_mapping_template_1.compoundExpression([
38
- graphql_mapping_template_1.qref('$expSet.put("#$entryKeyAttributeName", ":$entryKeyAttributeName")'),
39
- graphql_mapping_template_1.qref('$expNames.put("#$entryKeyAttributeName", "$entry.key")'),
40
- graphql_mapping_template_1.qref('$expValues.put(":$entryKeyAttributeName", $util.dynamodb.toDynamoDB($entry.value))'),
15
+ (0, graphql_mapping_template_1.comment)('Set the default values to put request'),
16
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('mergedValues'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)('ctx.stash.defaultValues'), (0, graphql_mapping_template_1.obj)({}))),
17
+ (0, graphql_mapping_template_1.comment)('copy the values from input'),
18
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('mergedValues.putAll'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)('ctx.args.input'), (0, graphql_mapping_template_1.obj)({})))),
19
+ (0, graphql_mapping_template_1.comment)('set the typename'),
20
+ (0, graphql_mapping_template_1.comment)('Initialize the vars for creating ddb expression'),
21
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('expNames'), (0, graphql_mapping_template_1.obj)({})),
22
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('expValues'), (0, graphql_mapping_template_1.obj)({})),
23
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('expSet'), (0, graphql_mapping_template_1.obj)({})),
24
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('expAdd'), (0, graphql_mapping_template_1.obj)({})),
25
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('expRemove'), (0, graphql_mapping_template_1.list)([])),
26
+ (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.ref)(objectKeyVariable), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('Key'), (0, graphql_mapping_template_1.ref)(objectKeyVariable)), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('Key'), (0, graphql_mapping_template_1.obj)({ id: (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.dynamodb.toDynamoDB'), (0, graphql_mapping_template_1.ref)('ctx.args.input.id')) }))),
27
+ (0, graphql_mapping_template_1.comment)('Model key'),
28
+ (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.ref)(objectKeyVariable), (0, graphql_mapping_template_1.compoundExpression)([
29
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('keyFields'), isSyncEnabled ? (0, graphql_mapping_template_1.list)([(0, graphql_mapping_template_1.str)('_version'), (0, graphql_mapping_template_1.str)('_deleted'), (0, graphql_mapping_template_1.str)('_lastChangedAt')]) : (0, graphql_mapping_template_1.list)([])),
30
+ (0, graphql_mapping_template_1.forEach)((0, graphql_mapping_template_1.ref)('entry'), (0, graphql_mapping_template_1.ref)(`${objectKeyVariable}.entrySet()`), [(0, graphql_mapping_template_1.qref)('$keyFields.add("$entry.key")')]),
31
+ ]), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('keyFields'), (0, graphql_mapping_template_1.list)(keyFields))),
32
+ (0, graphql_mapping_template_1.forEach)((0, graphql_mapping_template_1.ref)('entry'), (0, graphql_mapping_template_1.ref)(`util.map.copyAndRemoveAllKeys($mergedValues, $keyFields).entrySet()`), [
33
+ (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.raw)('!$util.isNull($ctx.stash.metadata.dynamodbNameOverrideMap) && $ctx.stash.metadata.dynamodbNameOverrideMap.containsKey("$entry.key")'), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('entryKeyAttributeName'), (0, graphql_mapping_template_1.raw)('$ctx.stash.metadata.dynamodbNameOverrideMap.get("$entry.key")')), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('entryKeyAttributeName'), (0, graphql_mapping_template_1.raw)('$entry.key'))),
34
+ (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.ref)('util.isNull($entry.value)'), (0, graphql_mapping_template_1.compoundExpression)([
35
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('discard'), (0, graphql_mapping_template_1.ref)(`expRemove.add("#$entryKeyAttributeName")`)),
36
+ (0, graphql_mapping_template_1.qref)(`$expNames.put("#$entryKeyAttributeName", "$entry.key")`),
37
+ ]), (0, graphql_mapping_template_1.compoundExpression)([
38
+ (0, graphql_mapping_template_1.qref)('$expSet.put("#$entryKeyAttributeName", ":$entryKeyAttributeName")'),
39
+ (0, graphql_mapping_template_1.qref)('$expNames.put("#$entryKeyAttributeName", "$entry.key")'),
40
+ (0, graphql_mapping_template_1.qref)('$expValues.put(":$entryKeyAttributeName", $util.dynamodb.toDynamoDB($entry.value))'),
41
41
  ])),
42
42
  ]),
43
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expression'), graphql_mapping_template_1.str('')),
44
- graphql_mapping_template_1.iff(graphql_mapping_template_1.raw('!$expSet.isEmpty()'), graphql_mapping_template_1.compoundExpression([
45
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expression'), graphql_mapping_template_1.str('SET')),
46
- graphql_mapping_template_1.forEach(graphql_mapping_template_1.ref('entry'), graphql_mapping_template_1.ref('expSet.entrySet()'), [
47
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expression'), graphql_mapping_template_1.str('$expression $entry.key = $entry.value')),
48
- graphql_mapping_template_1.iff(graphql_mapping_template_1.ref('foreach.hasNext()'), graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expression'), graphql_mapping_template_1.str('$expression,'))),
43
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('expression'), (0, graphql_mapping_template_1.str)('')),
44
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.raw)('!$expSet.isEmpty()'), (0, graphql_mapping_template_1.compoundExpression)([
45
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('expression'), (0, graphql_mapping_template_1.str)('SET')),
46
+ (0, graphql_mapping_template_1.forEach)((0, graphql_mapping_template_1.ref)('entry'), (0, graphql_mapping_template_1.ref)('expSet.entrySet()'), [
47
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('expression'), (0, graphql_mapping_template_1.str)('$expression $entry.key = $entry.value')),
48
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('foreach.hasNext()'), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('expression'), (0, graphql_mapping_template_1.str)('$expression,'))),
49
49
  ]),
50
50
  ])),
51
- graphql_mapping_template_1.iff(graphql_mapping_template_1.raw('!$expAdd.isEmpty()'), graphql_mapping_template_1.compoundExpression([
52
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expression'), graphql_mapping_template_1.str('$expression ADD')),
53
- graphql_mapping_template_1.forEach(graphql_mapping_template_1.ref('entry'), graphql_mapping_template_1.ref('expAdd.entrySet()'), [
54
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expression'), graphql_mapping_template_1.str('$expression $entry.key $entry.value')),
55
- graphql_mapping_template_1.iff(graphql_mapping_template_1.ref('foreach.hasNext()'), graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expression'), graphql_mapping_template_1.str('$expression,'))),
51
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.raw)('!$expAdd.isEmpty()'), (0, graphql_mapping_template_1.compoundExpression)([
52
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('expression'), (0, graphql_mapping_template_1.str)('$expression ADD')),
53
+ (0, graphql_mapping_template_1.forEach)((0, graphql_mapping_template_1.ref)('entry'), (0, graphql_mapping_template_1.ref)('expAdd.entrySet()'), [
54
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('expression'), (0, graphql_mapping_template_1.str)('$expression $entry.key $entry.value')),
55
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('foreach.hasNext()'), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('expression'), (0, graphql_mapping_template_1.str)('$expression,'))),
56
56
  ]),
57
57
  ])),
58
- graphql_mapping_template_1.iff(graphql_mapping_template_1.raw('!$expRemove.isEmpty()'), graphql_mapping_template_1.compoundExpression([
59
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expression'), graphql_mapping_template_1.str('$expression REMOVE')),
60
- graphql_mapping_template_1.forEach(graphql_mapping_template_1.ref('entry'), graphql_mapping_template_1.ref('expRemove'), [
61
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expression'), graphql_mapping_template_1.str('$expression $entry')),
62
- graphql_mapping_template_1.iff(graphql_mapping_template_1.ref('foreach.hasNext()'), graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expression'), graphql_mapping_template_1.str('$expression,'))),
58
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.raw)('!$expRemove.isEmpty()'), (0, graphql_mapping_template_1.compoundExpression)([
59
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('expression'), (0, graphql_mapping_template_1.str)('$expression REMOVE')),
60
+ (0, graphql_mapping_template_1.forEach)((0, graphql_mapping_template_1.ref)('entry'), (0, graphql_mapping_template_1.ref)('expRemove'), [
61
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('expression'), (0, graphql_mapping_template_1.str)('$expression $entry')),
62
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('foreach.hasNext()'), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('expression'), (0, graphql_mapping_template_1.str)('$expression,'))),
63
63
  ]),
64
64
  ])),
65
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('update'), graphql_mapping_template_1.obj({})),
66
- graphql_mapping_template_1.qref('$update.put("expression", "$expression")'),
67
- graphql_mapping_template_1.iff(graphql_mapping_template_1.raw('!$expNames.isEmpty()'), graphql_mapping_template_1.qref('$update.put("expressionNames", $expNames)')),
68
- graphql_mapping_template_1.iff(graphql_mapping_template_1.raw('!$expValues.isEmpty()'), graphql_mapping_template_1.qref('$update.put("expressionValues", $expValues)')),
65
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('update'), (0, graphql_mapping_template_1.obj)({})),
66
+ (0, graphql_mapping_template_1.qref)('$update.put("expression", "$expression")'),
67
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.raw)('!$expNames.isEmpty()'), (0, graphql_mapping_template_1.qref)('$update.put("expressionNames", $expNames)')),
68
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.raw)('!$expValues.isEmpty()'), (0, graphql_mapping_template_1.qref)('$update.put("expressionValues", $expValues)')),
69
69
  ...generateKeyConditionTemplate(true),
70
- graphql_mapping_template_1.iff(graphql_mapping_template_1.ref('context.args.condition'), graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('ctx.stash.conditions.add'), graphql_mapping_template_1.ref('context.args.condition')))),
71
- common_1.generateConditionSlot('ctx.stash.conditions', 'Conditions'),
72
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('UpdateItem'), graphql_mapping_template_1.obj({
73
- version: graphql_mapping_template_1.str('2018-05-29'),
74
- operation: graphql_mapping_template_1.str('UpdateItem'),
75
- key: graphql_mapping_template_1.ref('Key'),
76
- update: graphql_mapping_template_1.ref('update'),
77
- ...(isSyncEnabled && { _version: graphql_mapping_template_1.ref('util.defaultIfNull($ctx.args.input["_version"], "0")') }),
70
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('context.args.condition'), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.stash.conditions.add'), (0, graphql_mapping_template_1.ref)('context.args.condition')))),
71
+ (0, common_1.generateConditionSlot)('ctx.stash.conditions', 'Conditions'),
72
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('UpdateItem'), (0, graphql_mapping_template_1.obj)({
73
+ version: (0, graphql_mapping_template_1.str)('2018-05-29'),
74
+ operation: (0, graphql_mapping_template_1.str)('UpdateItem'),
75
+ key: (0, graphql_mapping_template_1.ref)('Key'),
76
+ update: (0, graphql_mapping_template_1.ref)('update'),
77
+ ...(isSyncEnabled && { _version: (0, graphql_mapping_template_1.ref)('util.defaultIfNull($ctx.args.input["_version"], "0")') }),
78
78
  })),
79
- graphql_mapping_template_1.iff(graphql_mapping_template_1.ref('Conditions'), graphql_mapping_template_1.compoundExpression([
80
- graphql_mapping_template_1.iff(graphql_mapping_template_1.ref('keyConditionExprNames'), graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('Conditions.expressionNames.putAll'), graphql_mapping_template_1.ref('keyConditionExprNames')))),
81
- graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('UpdateItem.put'), graphql_mapping_template_1.str('condition'), graphql_mapping_template_1.ref('Conditions'))),
79
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('Conditions'), (0, graphql_mapping_template_1.compoundExpression)([
80
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('keyConditionExprNames'), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('Conditions.expressionNames.putAll'), (0, graphql_mapping_template_1.ref)('keyConditionExprNames')))),
81
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('UpdateItem.put'), (0, graphql_mapping_template_1.str)('condition'), (0, graphql_mapping_template_1.ref)('Conditions'))),
82
82
  ])),
83
- graphql_mapping_template_1.toJson(graphql_mapping_template_1.ref('UpdateItem')),
83
+ (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('UpdateItem')),
84
84
  ];
85
- return graphql_mapping_template_1.printBlock(`${modelName} Update resolver`)(graphql_mapping_template_1.compoundExpression(statements));
85
+ return (0, graphql_mapping_template_1.printBlock)(`${modelName} Update resolver`)((0, graphql_mapping_template_1.compoundExpression)(statements));
86
86
  };
87
87
  exports.generateUpdateRequestTemplate = generateUpdateRequestTemplate;
88
88
  const generateCreateRequestTemplate = (modelName) => {
89
89
  const statements = [
90
- graphql_mapping_template_1.comment('Set the default values to put request'),
91
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('mergedValues'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.defaultIfNull'), graphql_mapping_template_1.ref('ctx.stash.defaultValues'), graphql_mapping_template_1.obj({}))),
92
- graphql_mapping_template_1.comment('copy the values from input'),
93
- graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('mergedValues.putAll'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.defaultIfNull'), graphql_mapping_template_1.ref('ctx.args.input'), graphql_mapping_template_1.obj({})))),
94
- graphql_mapping_template_1.comment('set the typename'),
95
- graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('mergedValues.put'), graphql_mapping_template_1.str('__typename'), graphql_mapping_template_1.str(modelName))),
96
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('PutObject'), graphql_mapping_template_1.obj({
97
- version: graphql_mapping_template_1.str('2018-05-29'),
98
- operation: graphql_mapping_template_1.str('PutItem'),
99
- attributeValues: graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.dynamodb.toMapValues'), graphql_mapping_template_1.ref('mergedValues')),
100
- condition: graphql_mapping_template_1.ref('condition'),
90
+ (0, graphql_mapping_template_1.comment)('Set the default values to put request'),
91
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('mergedValues'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)('ctx.stash.defaultValues'), (0, graphql_mapping_template_1.obj)({}))),
92
+ (0, graphql_mapping_template_1.comment)('copy the values from input'),
93
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('mergedValues.putAll'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)('ctx.args.input'), (0, graphql_mapping_template_1.obj)({})))),
94
+ (0, graphql_mapping_template_1.comment)('set the typename'),
95
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('mergedValues.put'), (0, graphql_mapping_template_1.str)('__typename'), (0, graphql_mapping_template_1.str)(modelName))),
96
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('PutObject'), (0, graphql_mapping_template_1.obj)({
97
+ version: (0, graphql_mapping_template_1.str)('2018-05-29'),
98
+ operation: (0, graphql_mapping_template_1.str)('PutItem'),
99
+ attributeValues: (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.dynamodb.toMapValues'), (0, graphql_mapping_template_1.ref)('mergedValues')),
100
+ condition: (0, graphql_mapping_template_1.ref)('condition'),
101
101
  })),
102
- graphql_mapping_template_1.iff(graphql_mapping_template_1.ref('context.args.condition'), graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('ctx.stash.conditions.add'), graphql_mapping_template_1.ref('context.args.condition')))),
102
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('context.args.condition'), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.stash.conditions.add'), (0, graphql_mapping_template_1.ref)('context.args.condition')))),
103
103
  ...generateKeyConditionTemplate(false),
104
- common_1.generateConditionSlot('ctx.stash.conditions', 'Conditions'),
105
- graphql_mapping_template_1.iff(graphql_mapping_template_1.ref('Conditions'), graphql_mapping_template_1.compoundExpression([
106
- graphql_mapping_template_1.iff(graphql_mapping_template_1.ref('keyConditionExprNames'), graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('Conditions.expressionNames.putAll'), graphql_mapping_template_1.ref('keyConditionExprNames')))),
107
- graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('PutObject.put'), graphql_mapping_template_1.str('condition'), graphql_mapping_template_1.ref('Conditions'))),
104
+ (0, common_1.generateConditionSlot)('ctx.stash.conditions', 'Conditions'),
105
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('Conditions'), (0, graphql_mapping_template_1.compoundExpression)([
106
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('keyConditionExprNames'), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('Conditions.expressionNames.putAll'), (0, graphql_mapping_template_1.ref)('keyConditionExprNames')))),
107
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('PutObject.put'), (0, graphql_mapping_template_1.str)('condition'), (0, graphql_mapping_template_1.ref)('Conditions'))),
108
108
  ])),
109
- graphql_mapping_template_1.ifElse(graphql_mapping_template_1.ref('ctx.stash.metadata.modelObjectKey'), graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('PutObject.put'), graphql_mapping_template_1.str('key'), graphql_mapping_template_1.ref('ctx.stash.metadata.modelObjectKey'))), graphql_mapping_template_1.compoundExpression([
110
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('Key'), graphql_mapping_template_1.obj({
111
- id: graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.dynamodb.toDynamoDB'), graphql_mapping_template_1.ref('mergedValues.id')),
109
+ (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.ref)('ctx.stash.metadata.modelObjectKey'), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('PutObject.put'), (0, graphql_mapping_template_1.str)('key'), (0, graphql_mapping_template_1.ref)('ctx.stash.metadata.modelObjectKey'))), (0, graphql_mapping_template_1.compoundExpression)([
110
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('Key'), (0, graphql_mapping_template_1.obj)({
111
+ id: (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.dynamodb.toDynamoDB'), (0, graphql_mapping_template_1.ref)('mergedValues.id')),
112
112
  })),
113
- graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('PutObject.put'), graphql_mapping_template_1.str('key'), graphql_mapping_template_1.ref('Key'))),
113
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('PutObject.put'), (0, graphql_mapping_template_1.str)('key'), (0, graphql_mapping_template_1.ref)('Key'))),
114
114
  ])),
115
- graphql_mapping_template_1.toJson(graphql_mapping_template_1.ref('PutObject')),
115
+ (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('PutObject')),
116
116
  ];
117
- return graphql_mapping_template_1.printBlock('Create Request template')(graphql_mapping_template_1.compoundExpression(statements));
117
+ return (0, graphql_mapping_template_1.printBlock)('Create Request template')((0, graphql_mapping_template_1.compoundExpression)(statements));
118
118
  };
119
119
  exports.generateCreateRequestTemplate = generateCreateRequestTemplate;
120
120
  const generateCreateInitSlotTemplate = (name, modelConfig) => {
121
121
  const statements = [
122
- graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('ctx.stash.put'), graphql_mapping_template_1.str('defaultValues'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.defaultIfNull'), graphql_mapping_template_1.ref('ctx.stash.defaultValues'), graphql_mapping_template_1.obj({})))),
122
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.stash.put'), (0, graphql_mapping_template_1.str)('defaultValues'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)('ctx.stash.defaultValues'), (0, graphql_mapping_template_1.obj)({})))),
123
123
  ];
124
124
  if (modelConfig === null || modelConfig === void 0 ? void 0 : modelConfig.timestamps) {
125
- statements.push(graphql_mapping_template_1.set(graphql_mapping_template_1.ref('createdAt'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.time.nowISO8601'))));
126
- statements.push(graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('ctx.stash.defaultValues.put'), graphql_mapping_template_1.str('id'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.autoId')))));
125
+ statements.push((0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('createdAt'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.time.nowISO8601'))));
126
+ statements.push((0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.stash.defaultValues.put'), (0, graphql_mapping_template_1.str)('id'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.autoId')))));
127
127
  if (modelConfig.timestamps.createdAt) {
128
- statements.push(graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('ctx.stash.defaultValues.put'), graphql_mapping_template_1.str(modelConfig.timestamps.createdAt), graphql_mapping_template_1.ref('createdAt'))));
128
+ statements.push((0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.stash.defaultValues.put'), (0, graphql_mapping_template_1.str)(modelConfig.timestamps.createdAt), (0, graphql_mapping_template_1.ref)('createdAt'))));
129
129
  }
130
130
  if (modelConfig.timestamps.updatedAt) {
131
- statements.push(graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('ctx.stash.defaultValues.put'), graphql_mapping_template_1.str(modelConfig.timestamps.updatedAt), graphql_mapping_template_1.ref('createdAt'))));
131
+ statements.push((0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.stash.defaultValues.put'), (0, graphql_mapping_template_1.str)(modelConfig.timestamps.updatedAt), (0, graphql_mapping_template_1.ref)('createdAt'))));
132
132
  }
133
133
  }
134
- statements.push(graphql_mapping_template_1.toJson(graphql_mapping_template_1.obj({
135
- version: graphql_mapping_template_1.str('2018-05-29'),
136
- payload: graphql_mapping_template_1.obj({}),
134
+ statements.push((0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.obj)({
135
+ version: (0, graphql_mapping_template_1.str)('2018-05-29'),
136
+ payload: (0, graphql_mapping_template_1.obj)({}),
137
137
  })));
138
- return graphql_mapping_template_1.printBlock('Initialization default values')(graphql_mapping_template_1.compoundExpression(statements));
138
+ return (0, graphql_mapping_template_1.printBlock)('Initialization default values')((0, graphql_mapping_template_1.compoundExpression)(statements));
139
139
  };
140
140
  exports.generateCreateInitSlotTemplate = generateCreateInitSlotTemplate;
141
141
  const generateDeleteRequestTemplate = (isSyncEnabled) => {
142
142
  const statements = [
143
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('DeleteRequest'), graphql_mapping_template_1.obj({
144
- version: graphql_mapping_template_1.str('2018-05-29'),
145
- operation: graphql_mapping_template_1.str('DeleteItem'),
143
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('DeleteRequest'), (0, graphql_mapping_template_1.obj)({
144
+ version: (0, graphql_mapping_template_1.str)('2018-05-29'),
145
+ operation: (0, graphql_mapping_template_1.str)('DeleteItem'),
146
146
  })),
147
- graphql_mapping_template_1.ifElse(graphql_mapping_template_1.ref('ctx.stash.metadata.modelObjectKey'), graphql_mapping_template_1.set(graphql_mapping_template_1.ref('Key'), graphql_mapping_template_1.ref('ctx.stash.metadata.modelObjectKey')), graphql_mapping_template_1.set(graphql_mapping_template_1.ref('Key'), graphql_mapping_template_1.obj({ id: graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.dynamodb.toDynamoDB'), graphql_mapping_template_1.ref('ctx.args.input.id')) }))),
148
- graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('DeleteRequest.put'), graphql_mapping_template_1.str('key'), graphql_mapping_template_1.ref('Key'))),
147
+ (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.ref)('ctx.stash.metadata.modelObjectKey'), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('Key'), (0, graphql_mapping_template_1.ref)('ctx.stash.metadata.modelObjectKey')), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('Key'), (0, graphql_mapping_template_1.obj)({ id: (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.dynamodb.toDynamoDB'), (0, graphql_mapping_template_1.ref)('ctx.args.input.id')) }))),
148
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('DeleteRequest.put'), (0, graphql_mapping_template_1.str)('key'), (0, graphql_mapping_template_1.ref)('Key'))),
149
149
  ...generateKeyConditionTemplate(true),
150
- graphql_mapping_template_1.iff(graphql_mapping_template_1.ref('context.args.condition'), graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('ctx.stash.conditions.add'), graphql_mapping_template_1.ref('context.args.condition')))),
151
- common_1.generateConditionSlot('ctx.stash.conditions', 'Conditions'),
152
- graphql_mapping_template_1.iff(graphql_mapping_template_1.ref('Conditions'), graphql_mapping_template_1.compoundExpression([
153
- graphql_mapping_template_1.iff(graphql_mapping_template_1.ref('keyConditionExprNames'), graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('Conditions.expressionNames.putAll'), graphql_mapping_template_1.ref('keyConditionExprNames')))),
154
- graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('DeleteRequest.put'), graphql_mapping_template_1.str('condition'), graphql_mapping_template_1.ref('Conditions'))),
150
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('context.args.condition'), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.stash.conditions.add'), (0, graphql_mapping_template_1.ref)('context.args.condition')))),
151
+ (0, common_1.generateConditionSlot)('ctx.stash.conditions', 'Conditions'),
152
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('Conditions'), (0, graphql_mapping_template_1.compoundExpression)([
153
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('keyConditionExprNames'), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('Conditions.expressionNames.putAll'), (0, graphql_mapping_template_1.ref)('keyConditionExprNames')))),
154
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('DeleteRequest.put'), (0, graphql_mapping_template_1.str)('condition'), (0, graphql_mapping_template_1.ref)('Conditions'))),
155
155
  ])),
156
156
  ];
157
157
  if (isSyncEnabled) {
158
- statements.push(graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('DeleteRequest.put'), graphql_mapping_template_1.str('_version'), graphql_mapping_template_1.ref('util.defaultIfNull($ctx.args.input["_version"], "0")'))));
158
+ statements.push((0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('DeleteRequest.put'), (0, graphql_mapping_template_1.str)('_version'), (0, graphql_mapping_template_1.ref)('util.defaultIfNull($ctx.args.input["_version"], "0")'))));
159
159
  }
160
- statements.push(graphql_mapping_template_1.toJson(graphql_mapping_template_1.ref('DeleteRequest')));
161
- return graphql_mapping_template_1.printBlock('Delete Request template')(graphql_mapping_template_1.compoundExpression(statements));
160
+ statements.push((0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('DeleteRequest')));
161
+ return (0, graphql_mapping_template_1.printBlock)('Delete Request template')((0, graphql_mapping_template_1.compoundExpression)(statements));
162
162
  };
163
163
  exports.generateDeleteRequestTemplate = generateDeleteRequestTemplate;
164
164
  const generateUpdateInitSlotTemplate = (modelName, modelConfig) => {
165
165
  const statements = [
166
- graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('ctx.stash.put'), graphql_mapping_template_1.str('defaultValues'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.defaultIfNull'), graphql_mapping_template_1.ref('ctx.stash.defaultValues'), graphql_mapping_template_1.obj({})))),
166
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.stash.put'), (0, graphql_mapping_template_1.str)('defaultValues'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)('ctx.stash.defaultValues'), (0, graphql_mapping_template_1.obj)({})))),
167
167
  ];
168
168
  if (modelConfig === null || modelConfig === void 0 ? void 0 : modelConfig.timestamps) {
169
169
  if (modelConfig.timestamps.updatedAt) {
170
- statements.push(graphql_mapping_template_1.set(graphql_mapping_template_1.ref('updatedAt'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.time.nowISO8601'))));
171
- statements.push(graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('ctx.stash.defaultValues.put'), graphql_mapping_template_1.str(modelConfig.timestamps.updatedAt), graphql_mapping_template_1.ref('updatedAt'))));
170
+ statements.push((0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('updatedAt'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.time.nowISO8601'))));
171
+ statements.push((0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.stash.defaultValues.put'), (0, graphql_mapping_template_1.str)(modelConfig.timestamps.updatedAt), (0, graphql_mapping_template_1.ref)('updatedAt'))));
172
172
  }
173
173
  }
174
- statements.push(graphql_mapping_template_1.toJson(graphql_mapping_template_1.obj({
175
- version: graphql_mapping_template_1.str('2018-05-29'),
176
- payload: graphql_mapping_template_1.obj({}),
174
+ statements.push((0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.obj)({
175
+ version: (0, graphql_mapping_template_1.str)('2018-05-29'),
176
+ payload: (0, graphql_mapping_template_1.obj)({}),
177
177
  })));
178
- return graphql_mapping_template_1.printBlock('Initialization default values')(graphql_mapping_template_1.compoundExpression(statements));
178
+ return (0, graphql_mapping_template_1.printBlock)('Initialization default values')((0, graphql_mapping_template_1.compoundExpression)(statements));
179
179
  };
180
180
  exports.generateUpdateInitSlotTemplate = generateUpdateInitSlotTemplate;
181
181
  function generateApplyDefaultsToInputTemplate(target) {
182
- return graphql_mapping_template_1.compoundExpression([
183
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref(target), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.defaultIfNull'), graphql_mapping_template_1.ref('ctx.stash.defaultValues'), graphql_mapping_template_1.obj({}))),
184
- graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref(`${target}.putAll`), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.defaultIfNull'), graphql_mapping_template_1.ref('ctx.args.input'), graphql_mapping_template_1.obj({})))),
182
+ return (0, graphql_mapping_template_1.compoundExpression)([
183
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(target), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)('ctx.stash.defaultValues'), (0, graphql_mapping_template_1.obj)({}))),
184
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)(`${target}.putAll`), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)('ctx.args.input'), (0, graphql_mapping_template_1.obj)({})))),
185
185
  ]);
186
186
  }
187
187
  exports.generateApplyDefaultsToInputTemplate = generateApplyDefaultsToInputTemplate;
188
188
  function generateKeyConditionTemplate(attributeExistsValue) {
189
189
  const statements = [
190
- graphql_mapping_template_1.comment('Begin - key condition'),
191
- graphql_mapping_template_1.ifElse(graphql_mapping_template_1.ref('ctx.stash.metadata.modelObjectKey'), graphql_mapping_template_1.compoundExpression([
192
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('keyConditionExpr'), graphql_mapping_template_1.obj({})),
193
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('keyConditionExprNames'), graphql_mapping_template_1.obj({})),
194
- graphql_mapping_template_1.forEach(graphql_mapping_template_1.ref('entry'), graphql_mapping_template_1.ref('ctx.stash.metadata.modelObjectKey.entrySet()'), [
195
- graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('keyConditionExpr.put'), graphql_mapping_template_1.str('keyCondition$velocityCount'), graphql_mapping_template_1.obj({ attributeExists: graphql_mapping_template_1.bool(attributeExistsValue) }))),
196
- graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('keyConditionExprNames.put'), graphql_mapping_template_1.str('#keyCondition$velocityCount'), graphql_mapping_template_1.str('$entry.key'))),
190
+ (0, graphql_mapping_template_1.comment)('Begin - key condition'),
191
+ (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.ref)('ctx.stash.metadata.modelObjectKey'), (0, graphql_mapping_template_1.compoundExpression)([
192
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('keyConditionExpr'), (0, graphql_mapping_template_1.obj)({})),
193
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('keyConditionExprNames'), (0, graphql_mapping_template_1.obj)({})),
194
+ (0, graphql_mapping_template_1.forEach)((0, graphql_mapping_template_1.ref)('entry'), (0, graphql_mapping_template_1.ref)('ctx.stash.metadata.modelObjectKey.entrySet()'), [
195
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('keyConditionExpr.put'), (0, graphql_mapping_template_1.str)('keyCondition$velocityCount'), (0, graphql_mapping_template_1.obj)({ attributeExists: (0, graphql_mapping_template_1.bool)(attributeExistsValue) }))),
196
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('keyConditionExprNames.put'), (0, graphql_mapping_template_1.str)('#keyCondition$velocityCount'), (0, graphql_mapping_template_1.str)('$entry.key'))),
197
197
  ]),
198
- graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('ctx.stash.conditions.add'), graphql_mapping_template_1.ref('keyConditionExpr'))),
199
- ]), graphql_mapping_template_1.compoundExpression([
200
- graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('ctx.stash.conditions.add'), graphql_mapping_template_1.obj({ id: graphql_mapping_template_1.obj({ attributeExists: graphql_mapping_template_1.bool(attributeExistsValue) }) }))),
198
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.stash.conditions.add'), (0, graphql_mapping_template_1.ref)('keyConditionExpr'))),
199
+ ]), (0, graphql_mapping_template_1.compoundExpression)([
200
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.stash.conditions.add'), (0, graphql_mapping_template_1.obj)({ id: (0, graphql_mapping_template_1.obj)({ attributeExists: (0, graphql_mapping_template_1.bool)(attributeExistsValue) }) }))),
201
201
  ])),
202
- graphql_mapping_template_1.comment('End - key condition'),
202
+ (0, graphql_mapping_template_1.comment)('End - key condition'),
203
203
  ];
204
204
  return statements;
205
205
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mutation.js","sourceRoot":"","sources":["../../src/resolvers/mutation.ts"],"names":[],"mappings":";;;AAAA,uEAmBkC;AAElC,qCAAiD;AAM1C,MAAM,6BAA6B,GAAG,CAAC,SAAiB,EAAE,aAAsB,EAAU,EAAE;IACjG,MAAM,iBAAiB,GAAG,mCAAmC,CAAC;IAC9D,MAAM,SAAS,GAAiB,CAAC,8BAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5C,IAAI,aAAa,EAAE;QACjB,SAAS,CAAC,IAAI,CAAC,8BAAG,CAAC,UAAU,CAAC,CAAC,CAAC;QAChC,SAAS,CAAC,IAAI,CAAC,8BAAG,CAAC,UAAU,CAAC,CAAC,CAAC;QAChC,SAAS,CAAC,IAAI,CAAC,8BAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC;KACvC;IACD,MAAM,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