@aws-amplify/graphql-model-transformer 0.6.4 → 0.6.5-amplify-export2.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.
@@ -1,18 +1,51 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateSyncRequestTemplate = exports.generateListRequestTemplate = exports.generateGetRequestTemplate = void 0;
3
+ exports.generateSyncRequestTemplate = exports.generateListRequestTemplate = exports.generateGetResponseTemplate = exports.generateGetRequestTemplate = void 0;
4
4
  const graphql_mapping_template_1 = require("graphql-mapping-template");
5
5
  const graphql_transformer_common_1 = require("graphql-transformer-common");
6
+ const authFilter = graphql_mapping_template_1.ref('ctx.stash.authFilter');
6
7
  const generateGetRequestTemplate = () => {
7
8
  const statements = [
8
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref('GetRequest'), graphql_mapping_template_1.obj({ version: graphql_mapping_template_1.str('2018-05-29'), operation: graphql_mapping_template_1.str('GetItem') })),
9
- 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.compoundExpression([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.id')) }))])),
10
- graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('GetRequest.put'), graphql_mapping_template_1.str('key'), graphql_mapping_template_1.ref('key'))),
9
+ graphql_mapping_template_1.set(graphql_mapping_template_1.ref('GetRequest'), graphql_mapping_template_1.obj({ version: graphql_mapping_template_1.str('2018-05-29'), operation: graphql_mapping_template_1.str('Query') })),
10
+ graphql_mapping_template_1.ifElse(graphql_mapping_template_1.ref('ctx.stash.metadata.modelObjectKey'), graphql_mapping_template_1.compoundExpression([
11
+ graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expression'), graphql_mapping_template_1.str('')),
12
+ graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expressionNames'), graphql_mapping_template_1.obj({})),
13
+ graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expressionValues'), graphql_mapping_template_1.obj({})),
14
+ graphql_mapping_template_1.forEach(graphql_mapping_template_1.ref('item'), graphql_mapping_template_1.ref('ctx.stash.metadata.modelObjectKey.entrySet()'), [
15
+ graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expression'), graphql_mapping_template_1.str('$expression#keyCount$velocityCount = :valueCount$velocityCount AND ')),
16
+ graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('expressionNames.put'), graphql_mapping_template_1.str('#keyCount$velocityCount'), graphql_mapping_template_1.ref('item.key'))),
17
+ graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('expressionValues.put'), graphql_mapping_template_1.str(':valueCount$velocityCount'), graphql_mapping_template_1.ref('item.value'))),
18
+ ]),
19
+ graphql_mapping_template_1.set(graphql_mapping_template_1.ref('expression'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('expression.replaceAll'), graphql_mapping_template_1.str('AND $'), graphql_mapping_template_1.str(''))),
20
+ graphql_mapping_template_1.set(graphql_mapping_template_1.ref('query'), graphql_mapping_template_1.obj({ expression: graphql_mapping_template_1.ref('expression'), expressionNames: graphql_mapping_template_1.ref('expressionNames'), expressionValues: graphql_mapping_template_1.ref('expressionValues') })),
21
+ ]), graphql_mapping_template_1.set(graphql_mapping_template_1.ref('query'), graphql_mapping_template_1.obj({
22
+ expression: graphql_mapping_template_1.str('id = :id'),
23
+ expressionValues: graphql_mapping_template_1.obj({
24
+ ':id': graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.parseJson'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.dynamodb.toDynamoDBJson'), graphql_mapping_template_1.ref('ctx.args.id'))),
25
+ }),
26
+ }))),
27
+ graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('GetRequest.put'), graphql_mapping_template_1.str('query'), graphql_mapping_template_1.ref('query'))),
28
+ graphql_mapping_template_1.iff(graphql_mapping_template_1.not(graphql_mapping_template_1.isNullOrEmpty(authFilter)), graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('GetRequest.put'), graphql_mapping_template_1.str('filter'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.parseJson'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.transform.toDynamoDBFilterExpression'), authFilter))))),
11
29
  graphql_mapping_template_1.toJson(graphql_mapping_template_1.ref('GetRequest')),
12
30
  ];
13
31
  return graphql_mapping_template_1.printBlock('Get Request template')(graphql_mapping_template_1.compoundExpression(statements));
14
32
  };
15
33
  exports.generateGetRequestTemplate = generateGetRequestTemplate;
34
+ const generateGetResponseTemplate = (isSyncEnabled) => {
35
+ const statements = new Array();
36
+ if (isSyncEnabled) {
37
+ statements.push(graphql_mapping_template_1.iff(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'))));
38
+ }
39
+ else {
40
+ statements.push(graphql_mapping_template_1.iff(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'))));
41
+ }
42
+ statements.push(graphql_mapping_template_1.ifElse(graphql_mapping_template_1.and([graphql_mapping_template_1.not(graphql_mapping_template_1.ref('ctx.result.items.isEmpty()')), graphql_mapping_template_1.equals(graphql_mapping_template_1.ref('ctx.result.scannedCount'), graphql_mapping_template_1.int(1))]), graphql_mapping_template_1.toJson(graphql_mapping_template_1.ref('ctx.result.items[0]')), graphql_mapping_template_1.compoundExpression([
43
+ graphql_mapping_template_1.iff(graphql_mapping_template_1.and([graphql_mapping_template_1.ref('ctx.result.items.isEmpty()'), graphql_mapping_template_1.equals(graphql_mapping_template_1.ref('ctx.result.scannedCount'), graphql_mapping_template_1.int(1))]), graphql_mapping_template_1.ref('util.unauthorized()')),
44
+ graphql_mapping_template_1.toJson(graphql_mapping_template_1.nul()),
45
+ ])));
46
+ return graphql_mapping_template_1.printBlock('Get Response template')(graphql_mapping_template_1.compoundExpression(statements));
47
+ };
48
+ exports.generateGetResponseTemplate = generateGetResponseTemplate;
16
49
  const generateListRequestTemplate = () => {
17
50
  const requestVariable = 'ListRequest';
18
51
  const modelQueryObj = 'ctx.stash.modelQueryExpression';
@@ -24,8 +57,12 @@ const generateListRequestTemplate = () => {
24
57
  limit: graphql_mapping_template_1.ref('limit'),
25
58
  })),
26
59
  graphql_mapping_template_1.iff(graphql_mapping_template_1.ref('context.args.nextToken'), graphql_mapping_template_1.set(graphql_mapping_template_1.ref(`${requestVariable}.nextToken`), graphql_mapping_template_1.ref('context.args.nextToken'))),
27
- graphql_mapping_template_1.iff(graphql_mapping_template_1.ref('context.args.filter'), graphql_mapping_template_1.compoundExpression([
28
- graphql_mapping_template_1.set(graphql_mapping_template_1.ref(`filterExpression`), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.parseJson'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.transform.toDynamoDBFilterExpression'), graphql_mapping_template_1.ref('ctx.args.filter')))),
60
+ graphql_mapping_template_1.ifElse(graphql_mapping_template_1.not(graphql_mapping_template_1.isNullOrEmpty(authFilter)), graphql_mapping_template_1.compoundExpression([
61
+ graphql_mapping_template_1.set(graphql_mapping_template_1.ref('filter'), authFilter),
62
+ graphql_mapping_template_1.iff(graphql_mapping_template_1.not(graphql_mapping_template_1.isNullOrEmpty(graphql_mapping_template_1.ref('ctx.args.filter'))), graphql_mapping_template_1.set(graphql_mapping_template_1.ref('filter'), graphql_mapping_template_1.obj({ and: graphql_mapping_template_1.list([graphql_mapping_template_1.ref('filter'), graphql_mapping_template_1.ref('ctx.args.filter')]) }))),
63
+ ]), graphql_mapping_template_1.iff(graphql_mapping_template_1.not(graphql_mapping_template_1.isNullOrEmpty(graphql_mapping_template_1.ref('ctx.args.filter'))), graphql_mapping_template_1.set(graphql_mapping_template_1.ref('filter'), graphql_mapping_template_1.ref('ctx.args.filter')))),
64
+ graphql_mapping_template_1.iff(graphql_mapping_template_1.not(graphql_mapping_template_1.isNullOrEmpty(graphql_mapping_template_1.ref('filter'))), graphql_mapping_template_1.compoundExpression([
65
+ graphql_mapping_template_1.set(graphql_mapping_template_1.ref(`filterExpression`), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.parseJson'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.transform.toDynamoDBFilterExpression'), graphql_mapping_template_1.ref('filter')))),
29
66
  graphql_mapping_template_1.iff(graphql_mapping_template_1.not(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.isNullOrBlank'), graphql_mapping_template_1.ref('filterExpression.expression'))), graphql_mapping_template_1.compoundExpression([
30
67
  graphql_mapping_template_1.iff(graphql_mapping_template_1.equals(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('filterEpression.expressionValues.size')), graphql_mapping_template_1.int(0)), graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('filterEpression.remove'), graphql_mapping_template_1.str('expressionValues')))),
31
68
  graphql_mapping_template_1.set(graphql_mapping_template_1.ref(`${requestVariable}.filter`), graphql_mapping_template_1.ref(`filterExpression`)),
@@ -47,10 +84,21 @@ const generateListRequestTemplate = () => {
47
84
  exports.generateListRequestTemplate = generateListRequestTemplate;
48
85
  const generateSyncRequestTemplate = () => {
49
86
  return graphql_mapping_template_1.printBlock('Sync Request template')(graphql_mapping_template_1.compoundExpression([
87
+ graphql_mapping_template_1.ifElse(graphql_mapping_template_1.not(graphql_mapping_template_1.isNullOrEmpty(authFilter)), graphql_mapping_template_1.compoundExpression([
88
+ graphql_mapping_template_1.set(graphql_mapping_template_1.ref('filter'), authFilter),
89
+ graphql_mapping_template_1.iff(graphql_mapping_template_1.not(graphql_mapping_template_1.isNullOrEmpty(graphql_mapping_template_1.ref('ctx.args.filter'))), graphql_mapping_template_1.set(graphql_mapping_template_1.ref('filter'), graphql_mapping_template_1.obj({ and: graphql_mapping_template_1.list([graphql_mapping_template_1.ref('filter'), graphql_mapping_template_1.ref('ctx.args.filter')]) }))),
90
+ ]), graphql_mapping_template_1.iff(graphql_mapping_template_1.not(graphql_mapping_template_1.isNullOrEmpty(graphql_mapping_template_1.ref('ctx.args.filter'))), graphql_mapping_template_1.set(graphql_mapping_template_1.ref('filter'), graphql_mapping_template_1.ref('ctx.args.filter')))),
91
+ graphql_mapping_template_1.iff(graphql_mapping_template_1.not(graphql_mapping_template_1.isNullOrEmpty(graphql_mapping_template_1.ref('filter'))), graphql_mapping_template_1.compoundExpression([
92
+ graphql_mapping_template_1.set(graphql_mapping_template_1.ref(`filterExpression`), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.parseJson'), graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.transform.toDynamoDBFilterExpression'), graphql_mapping_template_1.ref('filter')))),
93
+ graphql_mapping_template_1.iff(graphql_mapping_template_1.not(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('util.isNullOrBlank'), graphql_mapping_template_1.ref('filterExpression.expression'))), graphql_mapping_template_1.compoundExpression([
94
+ graphql_mapping_template_1.iff(graphql_mapping_template_1.equals(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('filterEpression.expressionValues.size')), graphql_mapping_template_1.int(0)), graphql_mapping_template_1.qref(graphql_mapping_template_1.methodCall(graphql_mapping_template_1.ref('filterEpression.remove'), graphql_mapping_template_1.str('expressionValues')))),
95
+ graphql_mapping_template_1.set(graphql_mapping_template_1.ref('filter'), graphql_mapping_template_1.ref('filterExpression')),
96
+ ])),
97
+ ])),
50
98
  graphql_mapping_template_1.obj({
51
99
  version: graphql_mapping_template_1.str('2018-05-29'),
52
100
  operation: graphql_mapping_template_1.str('Sync'),
53
- filter: graphql_mapping_template_1.ifElse(graphql_mapping_template_1.ref('context.args.filter'), graphql_mapping_template_1.ref('util.transform.toDynamoDBFilterExpression($ctx.args.filter)'), graphql_mapping_template_1.nul()),
101
+ filter: graphql_mapping_template_1.ifElse(graphql_mapping_template_1.ref('filter'), graphql_mapping_template_1.ref('util.toJson($filter)'), graphql_mapping_template_1.nul()),
54
102
  limit: graphql_mapping_template_1.ref(`util.defaultIfNull($ctx.args.limit, ${graphql_transformer_common_1.ResourceConstants.DEFAULT_SYNC_QUERY_PAGE_LIMIT})`),
55
103
  lastSync: graphql_mapping_template_1.ref('util.toJson($util.defaultIfNull($ctx.args.lastSync, null))'),
56
104
  nextToken: graphql_mapping_template_1.ref('util.toJson($util.defaultIfNull($ctx.args.nextToken, null))'),
@@ -1 +1 @@
1
- {"version":3,"file":"query.js","sourceRoot":"","sources":["../../src/resolvers/query.ts"],"names":[],"mappings":";;;AAAA,uEAmBkC;AAClC,2EAA+D;AAIxD,MAAM,0BAA0B,GAAG,GAAW,EAAE;IACrD,MAAM,UAAU,GAAiB;QAC/B,8BAAG,CAAC,8BAAG,CAAC,YAAY,CAAC,EAAE,8BAAG,CAAC,EAAE,OAAO,EAAE,8BAAG,CAAC,YAAY,CAAC,EAAE,SAAS,EAAE,8BAAG,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QACtF,iCAAM,CACJ,8BAAG,CAAC,mCAAmC,CAAC,EACxC,8BAAG,CAAC,8BAAG,CAAC,KAAK,CAAC,EAAE,8BAAG,CAAC,mCAAmC,CAAC,CAAC,EACzD,6CAAkB,CAAC,CAAC,8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amplify/graphql-model-transformer",
3
- "version": "0.6.4",
3
+ "version": "0.6.5-amplify-export2.0",
4
4
  "description": "Amplify graphql @model transformer",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,8 +28,8 @@
28
28
  "test-watch": "jest --watch"
29
29
  },
30
30
  "dependencies": {
31
- "@aws-amplify/graphql-transformer-core": "0.9.2",
32
- "@aws-amplify/graphql-transformer-interfaces": "1.10.0",
31
+ "@aws-amplify/graphql-transformer-core": "0.9.3-amplify-export2.0",
32
+ "@aws-amplify/graphql-transformer-interfaces": "1.10.1-amplify-export2.0",
33
33
  "@aws-cdk/assets": "~1.124.0",
34
34
  "@aws-cdk/aws-applicationautoscaling": "~1.124.0",
35
35
  "@aws-cdk/aws-appsync": "~1.124.0",
@@ -57,8 +57,8 @@
57
57
  "@aws-cdk/region-info": "~1.124.0",
58
58
  "constructs": "^3.3.125",
59
59
  "graphql": "^14.5.8",
60
- "graphql-mapping-template": "4.18.3",
61
- "graphql-transformer-common": "4.19.10",
60
+ "graphql-mapping-template": "4.18.4-amplify-export2.0",
61
+ "graphql-transformer-common": "4.19.11-amplify-export2.0",
62
62
  "lodash": "^4.17.21",
63
63
  "md5": "^2.3.0"
64
64
  },
@@ -83,5 +83,5 @@
83
83
  ],
84
84
  "collectCoverage": true
85
85
  },
86
- "gitHead": "7309d96240bc995699c2514320acc1e3f97ad73f"
86
+ "gitHead": "9b61aadb895c0307ef3267ca868fc4a68e7a853a"
87
87
  }