From fd9454243941f40d23eef4ea16a26d1d5553d31f Mon Sep 17 00:00:00 2001 From: halfmoontonight <17865422138@163.com> Date: Wed, 22 Jun 2022 13:49:09 -0400 Subject: [PATCH 01/15] add consistent read for dynamoDbGetItem, dynamoDbScanTable and dynamoDbQuery --- packages/@aws-cdk/aws-appsync/README.md | 2 +- .../aws-appsync/lib/mapping-template.ts | 12 ++++++------ .../aws-appsync/test/integ.api-import.ts | 2 +- .../aws-appsync/test/integ.auth-apikey.ts | 2 +- .../aws-appsync/test/integ.graphql-iam.ts | 4 ++-- .../aws-appsync/test/integ.graphql-schema.ts | 2 +- .../@aws-cdk/aws-appsync/test/integ.graphql.ts | 18 +++++++++--------- .../index.js | 12 +++++------- .../index.js | 12 +++++------- .../index.js | 8 +++----- .../index.js | 12 +++++------- 11 files changed, 39 insertions(+), 47 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index d7a54f9887cc7..a5679ee9273d2 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -80,7 +80,7 @@ const demoDS = api.addDynamoDbDataSource('demoDataSource', demoTable); demoDS.createResolver({ typeName: 'Query', fieldName: 'getDemos', - requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(), + requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(true), responseMappingTemplate: appsync.MappingTemplate.dynamoDbResultList(), }); diff --git a/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts b/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts index 09dcf53d8c775..55870660e4da8 100644 --- a/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts +++ b/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts @@ -36,8 +36,8 @@ export abstract class MappingTemplate { /** * Mapping template to scan a DynamoDB table to fetch all entries */ - public static dynamoDbScanTable(): MappingTemplate { - return this.fromString('{"version" : "2017-02-28", "operation" : "Scan"}'); + public static dynamoDbScanTable(consistentRead: boolean = false): MappingTemplate { + return this.fromString(`{"version" : "2017-02-28", "operation" : "Scan", "consistentRead": "${consistentRead}"}`); } /** @@ -45,8 +45,8 @@ export abstract class MappingTemplate { * * @param cond the key condition for the query */ - public static dynamoDbQuery(cond: KeyCondition, indexName?: string): MappingTemplate { - return this.fromString(`{"version" : "2017-02-28", "operation" : "Query", ${indexName ? `"index" : "${indexName}", ` : ''}${cond.renderTemplate()}}`); + public static dynamoDbQuery(cond: KeyCondition, consistentRead: boolean = false, indexName?: string): MappingTemplate { + return this.fromString(`{"version" : "2017-02-28", "operation" : "Query", "consistentRead": "${consistentRead}", ${indexName ? `"index" : "${indexName}", ` : ''}${cond.renderTemplate()}}`); } /** @@ -55,8 +55,8 @@ export abstract class MappingTemplate { * @param keyName the name of the hash key field * @param idArg the name of the Query argument */ - public static dynamoDbGetItem(keyName: string, idArg: string): MappingTemplate { - return this.fromString(`{"version": "2017-02-28", "operation": "GetItem", "key": {"${keyName}": $util.dynamodb.toDynamoDBJson($ctx.args.${idArg})}}`); + public static dynamoDbGetItem(keyName: string, idArg: string, consistentRead: boolean = false): MappingTemplate { + return this.fromString(`{"version": "2017-02-28", "operation": "GetItem", "consistentRead": "${consistentRead}", "key": {"${keyName}": $util.dynamodb.toDynamoDBJson($ctx.args.${idArg})}}`); } /** diff --git a/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts b/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts index a4ebc3105209e..edd0f41c1dc8e 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts @@ -46,7 +46,7 @@ const testDS = api.addDynamoDbDataSource('ds', testTable); testDS.createResolver({ typeName: 'Query', fieldName: 'getTests', - requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(), + requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(true), responseMappingTemplate: appsync.MappingTemplate.dynamoDbResultList(), }); diff --git a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts index f2e8cb4145732..37cebc84981c4 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts @@ -49,7 +49,7 @@ const testDS = api.addDynamoDbDataSource('testDataSource', testTable); testDS.createResolver({ typeName: 'Query', fieldName: 'getTests', - requestMappingTemplate: MappingTemplate.dynamoDbScanTable(), + requestMappingTemplate: MappingTemplate.dynamoDbScanTable(true), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.ts b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.ts index 86496338f585b..4166b7a2f31ba 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.ts @@ -69,14 +69,14 @@ const testDS = api.addDynamoDbDataSource('ds', testTable, { name: 'testDataSourc testDS.createResolver({ typeName: 'Query', fieldName: 'getTest', - requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id'), + requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id', true), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); testDS.createResolver({ typeName: 'Query', fieldName: 'getTests', - requestMappingTemplate: MappingTemplate.dynamoDbScanTable(), + requestMappingTemplate: MappingTemplate.dynamoDbScanTable(true), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.ts b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.ts index 6475b0bfae971..ad1003325fde5 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.ts @@ -67,7 +67,7 @@ const species = api.addType(new appsync.ObjectType('Species', { api.addQuery('getPlanets', new appsync.ResolvableField({ returnType: planet.attribute({ isList: true }), dataSource: tableDS, - requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(), + requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(true), responseMappingTemplate: appsync.MappingTemplate.dynamoDbResultList(), })); diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts b/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts index b014043b05607..58bd3b59c7cf7 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts @@ -114,13 +114,13 @@ const paymentDS = api.addDynamoDbDataSource('paymentDs', paymentTable, { name: ' customerDS.createResolver({ typeName: 'Query', fieldName: 'getCustomers', - requestMappingTemplate: MappingTemplate.dynamoDbScanTable(), + requestMappingTemplate: MappingTemplate.dynamoDbScanTable(true), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); customerDS.createResolver({ typeName: 'Query', fieldName: 'getCustomer', - requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id'), + requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id', true), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); customerDS.createResolver({ @@ -165,13 +165,13 @@ for (const { suffix, op } of ops) { orderDS.createResolver({ typeName: 'Query', fieldName: 'getCustomerOrders' + suffix, - requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('customer', 'customer')), + requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('customer', 'customer'), true), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); orderDS.createResolver({ typeName: 'Query', fieldName: 'getOrderCustomers' + suffix, - requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('order', 'order'), 'orderIndex'), + requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('order', 'order'), true, 'orderIndex'), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); } @@ -179,35 +179,35 @@ orderDS.createResolver({ typeName: 'Query', fieldName: 'getCustomerOrdersFilter', requestMappingTemplate: MappingTemplate.dynamoDbQuery( - KeyCondition.eq('customer', 'customer').and(KeyCondition.beginsWith('order', 'order'))), + KeyCondition.eq('customer', 'customer').and(KeyCondition.beginsWith('order', 'order')), true), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); orderDS.createResolver({ typeName: 'Query', fieldName: 'getCustomerOrdersBetween', requestMappingTemplate: MappingTemplate.dynamoDbQuery( - KeyCondition.eq('customer', 'customer').and(KeyCondition.between('order', 'order1', 'order2'))), + KeyCondition.eq('customer', 'customer').and(KeyCondition.between('order', 'order1', 'order2')), true), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); orderDS.createResolver({ typeName: 'Query', fieldName: 'getOrderCustomersFilter', requestMappingTemplate: MappingTemplate.dynamoDbQuery( - KeyCondition.eq('order', 'order').and(KeyCondition.beginsWith('customer', 'customer'))), + KeyCondition.eq('order', 'order').and(KeyCondition.beginsWith('customer', 'customer')), true), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); orderDS.createResolver({ typeName: 'Query', fieldName: 'getOrderCustomersBetween', requestMappingTemplate: MappingTemplate.dynamoDbQuery( - KeyCondition.eq('order', 'order').and(KeyCondition.between('customer', 'customer1', 'customer2')), 'orderIndex'), + KeyCondition.eq('order', 'order').and(KeyCondition.between('customer', 'customer1', 'customer2')), true, 'orderIndex'), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); paymentDS.createResolver({ typeName: 'Query', fieldName: 'getPayment', - requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id'), + requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id', true), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); paymentDS.createResolver({ diff --git a/packages/@aws-cdk/aws-dynamodb/test/global-replicas-provisioned.integ.snapshot/asset.5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80f/index.js b/packages/@aws-cdk/aws-dynamodb/test/global-replicas-provisioned.integ.snapshot/asset.5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80f/index.js index 6e55fd1bd6951..bc53d9780919c 100644 --- a/packages/@aws-cdk/aws-dynamodb/test/global-replicas-provisioned.integ.snapshot/asset.5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80f/index.js +++ b/packages/@aws-cdk/aws-dynamodb/test/global-replicas-provisioned.integ.snapshot/asset.5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80f/index.js @@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.isCompleteHandler = exports.onEventHandler = void 0; const aws_sdk_1 = require("aws-sdk"); // eslint-disable-line import/no-extraneous-dependencies async function onEventHandler(event) { - var _a, _b; console.log('Event: %j', event); const dynamodb = new aws_sdk_1.DynamoDB(); const tableName = event.ResourceProperties.TableName; @@ -23,7 +22,7 @@ async function onEventHandler(event) { TableName: tableName, }).promise(); console.log('Describe table: %j', describeTableResult); - const replicaExists = (_b = (_a = describeTableResult.Table) === null || _a === void 0 ? void 0 : _a.Replicas) === null || _b === void 0 ? void 0 : _b.some(replica => replica.RegionName === region); + const replicaExists = describeTableResult.Table?.Replicas?.some(replica => replica.RegionName === region); updateTableAction = replicaExists ? undefined : 'Create'; } if (updateTableAction) { @@ -48,17 +47,16 @@ async function onEventHandler(event) { } exports.onEventHandler = onEventHandler; async function isCompleteHandler(event) { - var _a, _b, _c; console.log('Event: %j', event); const dynamodb = new aws_sdk_1.DynamoDB(); const data = await dynamodb.describeTable({ TableName: event.ResourceProperties.TableName, }).promise(); console.log('Describe table: %j', data); - const tableActive = ((_a = data.Table) === null || _a === void 0 ? void 0 : _a.TableStatus) === 'ACTIVE'; - const replicas = (_c = (_b = data.Table) === null || _b === void 0 ? void 0 : _b.Replicas) !== null && _c !== void 0 ? _c : []; + const tableActive = data.Table?.TableStatus === 'ACTIVE'; + const replicas = data.Table?.Replicas ?? []; const regionReplica = replicas.find(r => r.RegionName === event.ResourceProperties.Region); - const replicaActive = (regionReplica === null || regionReplica === void 0 ? void 0 : regionReplica.ReplicaStatus) === 'ACTIVE'; + const replicaActive = regionReplica?.ReplicaStatus === 'ACTIVE'; const skipReplicationCompletedWait = event.ResourceProperties.SkipReplicationCompletedWait === 'true'; switch (event.RequestType) { case 'Create': @@ -71,4 +69,4 @@ async function isCompleteHandler(event) { } } exports.isCompleteHandler = isCompleteHandler; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxxQ0FBbUMsQ0FBQyx3REFBd0Q7QUFFckYsS0FBSyxVQUFVLGNBQWMsQ0FBQyxLQUFxQjs7SUFDeEQsT0FBTyxDQUFDLEdBQUcsQ0FBQyxXQUFXLEVBQUUsS0FBSyxDQUFDLENBQUM7SUFFaEMsTUFBTSxRQUFRLEdBQUcsSUFBSSxrQkFBUSxFQUFFLENBQUM7SUFFaEMsTUFBTSxTQUFTLEdBQUcsS0FBSyxDQUFDLGtCQUFrQixDQUFDLFNBQVMsQ0FBQztJQUNyRCxNQUFNLE1BQU0sR0FBRyxLQUFLLENBQUMsa0JBQWtCLENBQUMsTUFBTSxDQUFDO0lBRS9DLElBQUksaUJBQTZELENBQUM7SUFDbEUsSUFBSSxLQUFLLENBQUMsV0FBVyxLQUFLLFFBQVEsSUFBSSxLQUFLLENBQUMsV0FBVyxLQUFLLFFBQVEsRUFBRTtRQUNwRSxpQkFBaUIsR0FBRyxLQUFLLENBQUMsV0FBVyxDQUFDO0tBQ3ZDO1NBQU0sRUFBRSxTQUFTO1FBQ2hCLGtEQUFrRDtRQUNsRCx1RkFBdUY7UUFDdkYsb0hBQW9IO1FBQ3BILDBFQUEwRTtRQUMxRSxpRkFBaUY7UUFDakYsNkdBQTZHO1FBQzdH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QgcmVwbGljYUFjdGl2ZSA9IHJlZ2lvblJlcGxpY2E/LlJlcGxpY2FTdGF0dXMgPT09ICdBQ1RJVkUnO1xuICBjb25zdCBza2lwUmVwbGljYXRpb25Db21wbGV0ZWRXYWl0ID0gZXZlbnQuUmVzb3VyY2VQcm9wZXJ0aWVzLlNraXBSZXBsaWNhdGlvbkNvbXBsZXRlZFdhaXQgPT09ICd0cnVlJztcblxuICBzd2l0Y2ggKGV2ZW50LlJlcXVlc3RUeXBlKSB7XG4gICAgY2FzZSAnQ3JlYXRlJzpcbiAgICBjYXNlICdVcGRhdGUnOlxuICAgICAgLy8gQ29tcGxldGUgd2hlbiByZXBsaWNhIGlzIHJlcG9ydGVkIGFzIEFDVElWRVxuICAgICAgcmV0dXJuIHsgSXNDb21wbGV0ZTogdGFibGVBY3RpdmUgJiYgKHJlcGxpY2FBY3RpdmUgfHwgc2tpcFJlcGxpY2F0aW9uQ29tcGxldGVkV2FpdCkgfTtcbiAgICBjYXNlICdEZWxldGUnOlxuICAgICAgLy8gQ29tcGxldGUgd2hlbiByZXBsaWNhIGlzIGdvbmVcbiAgICAgIHJldHVybiB7IElzQ29tcGxldGU6IHRhYmxlQWN0aXZlICYmIHJlZ2lvblJlcGxpY2EgPT09IHVuZGVmaW5lZCB9O1xuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dynamodb/test/global.integ.snapshot/asset.5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80f/index.js b/packages/@aws-cdk/aws-dynamodb/test/global.integ.snapshot/asset.5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80f/index.js index 6e55fd1bd6951..bc53d9780919c 100644 --- a/packages/@aws-cdk/aws-dynamodb/test/global.integ.snapshot/asset.5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80f/index.js +++ b/packages/@aws-cdk/aws-dynamodb/test/global.integ.snapshot/asset.5d88959fad6bed204d22b24bf15826b8c7591c586a60a313e54f1948d9cdf80f/index.js @@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.isCompleteHandler = exports.onEventHandler = void 0; const aws_sdk_1 = require("aws-sdk"); // eslint-disable-line import/no-extraneous-dependencies async function onEventHandler(event) { - var _a, _b; console.log('Event: %j', event); const dynamodb = new aws_sdk_1.DynamoDB(); const tableName = event.ResourceProperties.TableName; @@ -23,7 +22,7 @@ async function onEventHandler(event) { TableName: tableName, }).promise(); console.log('Describe table: %j', describeTableResult); - const replicaExists = (_b = (_a = describeTableResult.Table) === null || _a === void 0 ? void 0 : _a.Replicas) === null || _b === void 0 ? void 0 : _b.some(replica => replica.RegionName === region); + const replicaExists = describeTableResult.Table?.Replicas?.some(replica => replica.RegionName === region); updateTableAction = replicaExists ? undefined : 'Create'; } if (updateTableAction) { @@ -48,17 +47,16 @@ async function onEventHandler(event) { } exports.onEventHandler = onEventHandler; async function isCompleteHandler(event) { - var _a, _b, _c; console.log('Event: %j', event); const dynamodb = new aws_sdk_1.DynamoDB(); const data = await dynamodb.describeTable({ TableName: event.ResourceProperties.TableName, }).promise(); console.log('Describe table: %j', data); - const tableActive = ((_a = data.Table) === null || _a === void 0 ? void 0 : _a.TableStatus) === 'ACTIVE'; - const replicas = (_c = (_b = data.Table) === null || _b === void 0 ? void 0 : _b.Replicas) !== null && _c !== void 0 ? _c : []; + const tableActive = data.Table?.TableStatus === 'ACTIVE'; + const replicas = data.Table?.Replicas ?? []; const regionReplica = replicas.find(r => r.RegionName === event.ResourceProperties.Region); - const replicaActive = (regionReplica === null || regionReplica === void 0 ? void 0 : regionReplica.ReplicaStatus) === 'ACTIVE'; + const replicaActive = regionReplica?.ReplicaStatus === 'ACTIVE'; const skipReplicationCompletedWait = event.ResourceProperties.SkipReplicationCompletedWait === 'true'; switch (event.RequestType) { case 'Create': @@ -71,4 +69,4 @@ async function isCompleteHandler(event) { } } exports.isCompleteHandler = isCompleteHandler; -//# sourceMappingURL=data:application/json;base64,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B7XG4gICAgY2FzZSAnQ3JlYXRlJzpcbiAgICBjYXNlICdVcGRhdGUnOlxuICAgICAgLy8gQ29tcGxldGUgd2hlbiByZXBsaWNhIGlzIHJlcG9ydGVkIGFzIEFDVElWRVxuICAgICAgcmV0dXJuIHsgSXNDb21wbGV0ZTogdGFibGVBY3RpdmUgJiYgKHJlcGxpY2FBY3RpdmUgfHwgc2tpcFJlcGxpY2F0aW9uQ29tcGxldGVkV2FpdCkgfTtcbiAgICBjYXNlICdEZWxldGUnOlxuICAgICAgLy8gQ29tcGxldGUgd2hlbiByZXBsaWNhIGlzIGdvbmVcbiAgICAgIHJldHVybiB7IElzQ29tcGxldGU6IHRhYmxlQWN0aXZlICYmIHJlZ2lvblJlcGxpY2EgPT09IHVuZGVmaW5lZCB9O1xuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/cluster-snapshot.integ.snapshot/asset.1e025324752b3133dc230c4b8b8752f666b63c09cd4aa605ec2b322cc40def2e/index.js b/packages/@aws-cdk/aws-rds/test/cluster-snapshot.integ.snapshot/asset.1e025324752b3133dc230c4b8b8752f666b63c09cd4aa605ec2b322cc40def2e/index.js index de753f1849b44..ace8820de773e 100644 --- a/packages/@aws-cdk/aws-rds/test/cluster-snapshot.integ.snapshot/asset.1e025324752b3133dc230c4b8b8752f666b63c09cd4aa605ec2b322cc40def2e/index.js +++ b/packages/@aws-cdk/aws-rds/test/cluster-snapshot.integ.snapshot/asset.1e025324752b3133dc230c4b8b8752f666b63c09cd4aa605ec2b322cc40def2e/index.js @@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.isCompleteHandler = exports.onEventHandler = void 0; const aws_sdk_1 = require("aws-sdk"); // eslint-disable-line import/no-extraneous-dependencies async function onEventHandler(event) { - var _a; console.log('Event: %j', event); const rds = new aws_sdk_1.RDS(); const physicalResourceId = `${event.ResourceProperties.DBClusterIdentifier}-${event.ResourceProperties.DBClusterIdentifier}`; @@ -15,7 +14,7 @@ async function onEventHandler(event) { return { PhysicalResourceId: physicalResourceId, Data: { - DBClusterSnapshotArn: (_a = data.DBClusterSnapshot) === null || _a === void 0 ? void 0 : _a.DBClusterSnapshotArn, + DBClusterSnapshotArn: data.DBClusterSnapshot?.DBClusterSnapshotArn, }, }; } @@ -42,13 +41,12 @@ async function isCompleteHandler(event) { } exports.isCompleteHandler = isCompleteHandler; async function tryGetClusterSnapshotStatus(identifier) { - var _a; try { const rds = new aws_sdk_1.RDS(); const data = await rds.describeDBClusterSnapshots({ DBClusterSnapshotIdentifier: identifier, }).promise(); - return (_a = data.DBClusterSnapshots) === null || _a === void 0 ? void 0 : _a[0].Status; + return data.DBClusterSnapshots?.[0].Status; } catch (err) { if (err.code === 'DBClusterSnapshotNotFoundFault') { @@ -57,4 +55,4 @@ async function tryGetClusterSnapshotStatus(identifier) { throw err; } } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxxQ0FBOEIsQ0FBQyx3REFBd0Q7QUFFaEYsS0FBSyxVQUFVLGNBQWMsQ0FBQyxLQUFxQjs7SUFDeEQsT0FBTyxDQUFDLEdBQUcsQ0FBQyxXQUFXLEVBQUUsS0FBSyxDQUFDLENBQUM7SUFFaEMsTUFBTSxHQUFHLEdBQUcsSUFBSSxhQUFHLEVBQUUsQ0FBQztJQUV0QixNQUFNLGtCQUFrQixHQUFHLEdBQUcsS0FBSyxDQUFDLGtCQUFrQixDQUFDLG1CQUFtQixJQUFJLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxtQkFBbUIsRUFBRSxDQUFDO0lBRTdILElBQUksS0FBSyxDQUFDLFdBQVcsS0FBSyxRQUFRLElBQUksS0FBSyxDQUFDLFdBQVcsS0FBSyxRQUFRLEVBQUU7UUFDcEUsTUFB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U3RhdHVzID09PSAnYXZhaWxhYmxlJyB9O1xuICAgIGNhc2UgJ0RlbGV0ZSc6XG4gICAgICByZXR1cm4geyBJc0NvbXBsZXRlOiBzbmFwc2hvdFN0YXR1cyA9PT0gdW5kZWZpbmVkIH07XG4gIH1cbn1cblxuYXN5bmMgZnVuY3Rpb24gdHJ5R2V0Q2x1c3RlclNuYXBzaG90U3RhdHVzKGlkZW50aWZpZXI6IHN0cmluZyk6IFByb21pc2U8c3RyaW5nIHwgdW5kZWZpbmVkPiB7XG4gIHRyeSB7XG4gICAgY29uc3QgcmRzID0gbmV3IFJEUygpO1xuICAgIGNvbnN0IGRhdGEgPSBhd2FpdCByZHMuZGVzY3JpYmVEQkNsdXN0ZXJTbmFwc2hvdHMoe1xuICAgICAgREJDbHVzdGVyU25hcHNob3RJZGVudGlmaWVyOiBpZGVudGlmaWVyLFxuICAgIH0pLnByb21pc2UoKTtcbiAgICByZXR1cm4gZGF0YS5EQkNsdXN0ZXJTbmFwc2hvdHM/LlswXS5TdGF0dXM7XG4gIH0gY2F0Y2ggKGVycikge1xuICAgIGlmIChlcnIuY29kZSA9PT0gJ0RCQ2x1c3RlclNuYXBzaG90Tm90Rm91bmRGYXVsdCcpIHtcbiAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxuICAgIHRocm93IGVycjtcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/instance.lit.integ.snapshot/asset.22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665/index.js b/packages/@aws-cdk/aws-rds/test/instance.lit.integ.snapshot/asset.22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665/index.js index 5292af72a643d..249a5b580714f 100644 --- a/packages/@aws-cdk/aws-rds/test/instance.lit.integ.snapshot/asset.22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665/index.js +++ b/packages/@aws-cdk/aws-rds/test/instance.lit.integ.snapshot/asset.22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665/index.js @@ -12,15 +12,14 @@ const AWS = require("aws-sdk"); * @param options CloudWatch API SDK options. */ async function createLogGroupSafe(logGroupName, region, options) { - var _a; // If we set the log retention for a lambda, then due to the async nature of // Lambda logging there could be a race condition when the same log group is // already being created by the lambda execution. This can sometime result in // an error "OperationAbortedException: A conflicting operation is currently // in progress...Please try again." // To avoid an error, we do as requested and try again. - let retryCount = (options === null || options === void 0 ? void 0 : options.maxRetries) == undefined ? 10 : options.maxRetries; - const delay = ((_a = options === null || options === void 0 ? void 0 : options.retryOptions) === null || _a === void 0 ? void 0 : _a.base) == undefined ? 10 : options.retryOptions.base; + let retryCount = options?.maxRetries == undefined ? 10 : options.maxRetries; + const delay = options?.retryOptions?.base == undefined ? 10 : options.retryOptions.base; do { try { const cloudwatchlogs = new AWS.CloudWatchLogs({ apiVersion: '2014-03-28', region, ...options }); @@ -56,13 +55,12 @@ async function createLogGroupSafe(logGroupName, region, options) { * @param retentionInDays the number of days to retain the log events in the specified log group. */ async function setRetentionPolicy(logGroupName, region, options, retentionInDays) { - var _a; // The same as in createLogGroupSafe(), here we could end up with the race // condition where a log group is either already being created or its retention // policy is being updated. This would result in an OperationAbortedException, // which we will try to catch and retry the command a number of times before failing - let retryCount = (options === null || options === void 0 ? void 0 : options.maxRetries) == undefined ? 10 : options.maxRetries; - const delay = ((_a = options === null || options === void 0 ? void 0 : options.retryOptions) === null || _a === void 0 ? void 0 : _a.base) == undefined ? 10 : options.retryOptions.base; + let retryCount = options?.maxRetries == undefined ? 10 : options.maxRetries; + const delay = options?.retryOptions?.base == undefined ? 10 : options.retryOptions.base; do { try { const cloudwatchlogs = new AWS.CloudWatchLogs({ apiVersion: '2014-03-28', region, ...options }); @@ -173,4 +171,4 @@ async function handler(event, context) { } } exports.handler = handler; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3Vy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gICAgICByZXF1ZXN0Lm9uKCdlcnJvcicsIHJlamVjdCk7XG4gICAgICAgIHJlcXVlc3Qud3JpdGUocmVzcG9uc2VCb2R5KTtcbiAgICAgICAgcmVxdWVzdC5lbmQoKTtcbiAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgcmVqZWN0KGUpO1xuICAgICAgfVxuICAgIH0pO1xuICB9XG5cbiAgZnVuY3Rpb24gcGFyc2VSZXRyeU9wdGlvbnMocmF3T3B0aW9uczogYW55KTogU2RrUmV0cnlPcHRpb25zIHtcbiAgICBjb25zdCByZXRyeU9wdGlvbnM6IFNka1JldHJ5T3B0aW9ucyA9IHt9O1xuICAgIGlmIChyYXdPcHRpb25zKSB7XG4gICAgICBpZiAocmF3T3B0aW9ucy5tYXhSZXRyaWVzKSB7XG4gICAgICAgIHJldHJ5T3B0aW9ucy5tYXhSZXRyaWVzID0gcGFyc2VJbnQocmF3T3B0aW9ucy5tYXhSZXRyaWVzLCAxMCk7XG4gICAgICB9XG4gICAgICBpZiAocmF3T3B0aW9ucy5iYXNlKSB7XG4gICAgICAgIHJldHJ5T3B0aW9ucy5yZXRyeU9wdGlvbnMgPSB7XG4gICAgICAgICAgYmFzZTogcGFyc2VJbnQocmF3T3B0aW9ucy5iYXNlLCAxMCksXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiByZXRyeU9wdGlvbnM7XG4gIH1cbn1cbiJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsK0JBQStCOzs7QUFFL0IsNkRBQTZEO0FBQzdELCtCQUErQjtBQVMvQjs7Ozs7O0dBTUc7QUFDSCxLQUFLLFVBQVUsa0JBQWtCLENBQUMsWUFBb0IsRUFBRSxNQUFlLEVBQU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IGlmIChyYXdPcHRpb25zKSB7XG4gICAgICBpZiAocmF3T3B0aW9ucy5tYXhSZXRyaWVzKSB7XG4gICAgICAgIHJldHJ5T3B0aW9ucy5tYXhSZXRyaWVzID0gcGFyc2VJbnQocmF3T3B0aW9ucy5tYXhSZXRyaWVzLCAxMCk7XG4gICAgICB9XG4gICAgICBpZiAocmF3T3B0aW9ucy5iYXNlKSB7XG4gICAgICAgIHJldHJ5T3B0aW9ucy5yZXRyeU9wdGlvbnMgPSB7XG4gICAgICAgICAgYmFzZTogcGFyc2VJbnQocmF3T3B0aW9ucy5iYXNlLCAxMCksXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiByZXRyeU9wdGlvbnM7XG4gIH1cbn1cbiJdfQ== \ No newline at end of file From 1d04a0a90f8f153097b65afb8b0f0247f71e37cc Mon Sep 17 00:00:00 2001 From: halfmoontonight <17865422138@163.com> Date: Wed, 22 Jun 2022 22:35:07 -0400 Subject: [PATCH 02/15] change the indent --- .../aws-appsync/lib/mapping-template.ts | 2 +- .../aws-appsync-integ.assets.json | 6 ++-- .../aws-appsync-integ.template.json | 2 +- .../test/auth-apikey.integ.snapshot/cdk.out | 2 +- .../auth-apikey.integ.snapshot/integ.json | 4 +-- .../auth-apikey.integ.snapshot/manifest.json | 2 +- .../test/auth-apikey.integ.snapshot/tree.json | 4 +-- .../aws-appsync-integ.assets.json | 4 +-- .../aws-appsync-integ.template.json | 4 +-- .../test/graphql-iam.integ.snapshot/tree.json | 10 +++--- .../graphql-schema.integ.snapshot/cdk.out | 2 +- .../code-first-schema.assets.json | 6 ++-- .../code-first-schema.template.json | 2 +- .../graphql-schema.integ.snapshot/integ.json | 4 +-- .../manifest.json | 2 +- .../graphql-schema.integ.snapshot/tree.json | 4 +-- .../aws-appsync-integ.assets.json | 6 ++-- .../aws-appsync-integ.template.json | 34 +++++++++--------- .../test/graphql.integ.snapshot/cdk.out | 2 +- .../test/graphql.integ.snapshot/integ.json | 4 +-- .../test/graphql.integ.snapshot/manifest.json | 2 +- .../test/graphql.integ.snapshot/tree.json | 36 +++++++++---------- 22 files changed, 72 insertions(+), 72 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts b/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts index 55870660e4da8..2dbd784a15fc4 100644 --- a/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts +++ b/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts @@ -45,7 +45,7 @@ export abstract class MappingTemplate { * * @param cond the key condition for the query */ - public static dynamoDbQuery(cond: KeyCondition, consistentRead: boolean = false, indexName?: string): MappingTemplate { + public static dynamoDbQuery(cond: KeyCondition, consistentRead: boolean = false, indexName?: string): MappingTemplate { return this.fromString(`{"version" : "2017-02-28", "operation" : "Query", "consistentRead": "${consistentRead}", ${indexName ? `"index" : "${indexName}", ` : ''}${cond.renderTemplate()}}`); } diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json index c9c54f9fa9d63..d13fa5275b9ed 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "17.0.0", + "version": "20.0.0", "files": { - "662d596c9f903a17e9d22652d1bd0743cc93eee9b2ab0187f59c81096e13b7f1": { + "392e6345c6888314a2c190df55d2deb9821e1ce3ead9eac560725a04ba5d9cc4": { "source": { "path": "aws-appsync-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "662d596c9f903a17e9d22652d1bd0743cc93eee9b2ab0187f59c81096e13b7f1.json", + "objectKey": "392e6345c6888314a2c190df55d2deb9821e1ce3ead9eac560725a04ba5d9cc4.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json index fead0030e8790..f270706f0c1a6 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json @@ -135,7 +135,7 @@ "TypeName": "Query", "DataSourceName": "testDataSource", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/integ.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/integ.json index 772515b95b3d0..f15c88130a8fd 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/integ.json @@ -1,7 +1,7 @@ { - "version": "18.0.0", + "version": "20.0.0", "testCases": { - "aws-appsync/test/integ.auth-apikey": { + "integ.auth-apikey": { "stacks": [ "aws-appsync-integ" ], diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/manifest.json index d9bcb28cf11ad..9489643ac4256 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json index 4e043caf2cfa6..2796ad10d816e 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "aws-appsync-integ": { @@ -231,7 +231,7 @@ "typeName": "Query", "dataSourceName": "testDataSource", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.assets.json b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.assets.json index a50b5e1f2e3aa..8d44dcb843f7d 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.assets.json @@ -14,7 +14,7 @@ } } }, - "4d9e950f40fbc075b913a37030dfd9c31de11a2230d2c5c7e45b8b9730faaa3f": { + "551977c2a18f5a3064964ab5d44fcd937c58edfaafc7def14b6c748d0a3985d8": { "source": { "path": "aws-appsync-integ.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "4d9e950f40fbc075b913a37030dfd9c31de11a2230d2c5c7e45b8b9730faaa3f.json", + "objectKey": "551977c2a18f5a3064964ab5d44fcd937c58edfaafc7def14b6c748d0a3985d8.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.template.json b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.template.json index b04cdfd5703cb..ecabc4544f465 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.template.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.template.json @@ -166,7 +166,7 @@ "TypeName": "Query", "DataSourceName": "testDataSource", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"true\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "ResponseMappingTemplate": "$util.toJson($ctx.result)" }, "DependsOn": [ @@ -187,7 +187,7 @@ "TypeName": "Query", "DataSourceName": "testDataSource", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/tree.json index 4b239e8ce699e..dc5e7bd09bc79 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "aws-appsync-integ": { @@ -273,7 +273,7 @@ "typeName": "Query", "dataSourceName": "testDataSource", "kind": "UNIT", - "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"true\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "responseMappingTemplate": "$util.toJson($ctx.result)" } }, @@ -308,7 +308,7 @@ "typeName": "Query", "dataSourceName": "testDataSource", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -714,13 +714,13 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "testFail": { diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.assets.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.assets.json index 64895abc5e022..f1a39cb587d17 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.assets.json @@ -1,7 +1,7 @@ { - "version": "17.0.0", + "version": "20.0.0", "files": { - "13205a5206cf49ce1c9674807fa5b2c3315de95159c5c1c969664271edd96507": { + "4fca5b2ff088995ca1b32533c8d03ec30fa003d599daa13054e656903ef8e27b": { "source": { "path": "code-first-schema.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "13205a5206cf49ce1c9674807fa5b2c3315de95159c5c1c969664271edd96507.json", + "objectKey": "4fca5b2ff088995ca1b32533c8d03ec30fa003d599daa13054e656903ef8e27b.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.template.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.template.json index 9266e0f93d7fd..fe2548e165160 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.template.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.template.json @@ -134,7 +134,7 @@ "TypeName": "Query", "DataSourceName": "planets", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/integ.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/integ.json index 1b8a798c9cb6a..6fc2cc58e5c36 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/integ.json @@ -1,7 +1,7 @@ { - "version": "18.0.0", + "version": "20.0.0", "testCases": { - "aws-appsync/test/integ.graphql-schema": { + "integ.graphql-schema": { "stacks": [ "code-first-schema" ], diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/manifest.json index 6a4631d8d8424..0b009deecc70a 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/tree.json index f6cc9f377f9e0..2dde8fdf61bcf 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "code-first-schema": { @@ -236,7 +236,7 @@ "typeName": "Query", "dataSourceName": "planets", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.assets.json b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.assets.json index 6d4ab4f20ea5e..430455b60c2fa 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "17.0.0", + "version": "20.0.0", "files": { - "7b4937a061e73c53a8d1ae8eeb6c778db65cfc02df7a34947b816bcd1332f9c9": { + "d219761981d654f39dcb5213a36a8ec4da864463cde985ffde1f03b988cb4572": { "source": { "path": "aws-appsync-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7b4937a061e73c53a8d1ae8eeb6c778db65cfc02df7a34947b816bcd1332f9c9.json", + "objectKey": "d219761981d654f39dcb5213a36a8ec4da864463cde985ffde1f03b988cb4572.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.template.json b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.template.json index a394e054ce118..3702ab75d5aea 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.template.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.template.json @@ -214,7 +214,7 @@ "TypeName": "Query", "DataSourceName": "Customer", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -235,7 +235,7 @@ "TypeName": "Query", "DataSourceName": "Customer", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"true\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "ResponseMappingTemplate": "$util.toJson($ctx.result)" }, "DependsOn": [ @@ -439,7 +439,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -460,7 +460,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -481,7 +481,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -502,7 +502,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -523,7 +523,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -544,7 +544,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -565,7 +565,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -586,7 +586,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -607,7 +607,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -628,7 +628,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -649,7 +649,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -670,7 +670,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -691,7 +691,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -712,7 +712,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -833,7 +833,7 @@ "TypeName": "Query", "DataSourceName": "Payment", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"true\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "ResponseMappingTemplate": "$util.toJson($ctx.result)" }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/integ.json b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/integ.json index 503b1dc823c61..6700e069e8cd2 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/integ.json @@ -1,7 +1,7 @@ { - "version": "18.0.0", + "version": "20.0.0", "testCases": { - "aws-appsync/test/integ.graphql": { + "integ.graphql": { "stacks": [ "aws-appsync-integ" ], diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/manifest.json index 3ed7d42cd0302..4aa099c563dfc 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/tree.json index 247f5d512bf1e..fbafbe1ee3f64 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "aws-appsync-integ": { @@ -358,7 +358,7 @@ "typeName": "Query", "dataSourceName": "Customer", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -393,7 +393,7 @@ "typeName": "Query", "dataSourceName": "Customer", "kind": "UNIT", - "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"true\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "responseMappingTemplate": "$util.toJson($ctx.result)" } }, @@ -721,7 +721,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -756,7 +756,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -791,7 +791,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -826,7 +826,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -861,7 +861,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -896,7 +896,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -931,7 +931,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -966,7 +966,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1001,7 +1001,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1036,7 +1036,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1071,7 +1071,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1106,7 +1106,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1141,7 +1141,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1176,7 +1176,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1365,7 +1365,7 @@ "typeName": "Query", "dataSourceName": "Payment", "kind": "UNIT", - "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"true\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "responseMappingTemplate": "$util.toJson($ctx.result)" } }, From bc2cd79736ef62b33c7434c0ddd8fdad915d7a27 Mon Sep 17 00:00:00 2001 From: halfmoontonight <17865422138@163.com> Date: Thu, 30 Jun 2022 20:30:22 -0400 Subject: [PATCH 03/15] add tests for consistentRead --- .../aws-appsync/lib/mapping-template.ts | 2 +- .../aws-appsync-integ.assets.json | 4 +- .../aws-appsync-integ.template.json | 2 +- .../test/auth-apikey.integ.snapshot/tree.json | 2 +- .../aws-appsync-integ.assets.json | 4 +- .../aws-appsync-integ.template.json | 4 +- .../test/graphql-iam.integ.snapshot/tree.json | 4 +- .../code-first-schema.assets.json | 4 +- .../code-first-schema.template.json | 2 +- .../manifest.json | 9 + .../graphql-schema.integ.snapshot/tree.json | 2 +- .../aws-appsync-integ.assets.json | 4 +- .../aws-appsync-integ.template.json | 555 +++++++- .../test/graphql.integ.snapshot/manifest.json | 150 +++ .../test/graphql.integ.snapshot/tree.json | 1137 +++++++++++++++-- .../aws-appsync/test/integ.api-import.ts | 2 +- .../aws-appsync/test/integ.auth-apikey.ts | 2 +- .../aws-appsync/test/integ.graphql-iam.ts | 4 +- .../aws-appsync/test/integ.graphql-schema.ts | 2 +- .../aws-appsync/test/integ.graphql.graphql | 25 + .../aws-appsync/test/integ.graphql.ts | 72 +- 21 files changed, 1817 insertions(+), 175 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts b/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts index 2dbd784a15fc4..b34a4b662ece0 100644 --- a/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts +++ b/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts @@ -45,7 +45,7 @@ export abstract class MappingTemplate { * * @param cond the key condition for the query */ - public static dynamoDbQuery(cond: KeyCondition, consistentRead: boolean = false, indexName?: string): MappingTemplate { + public static dynamoDbQuery(cond: KeyCondition, indexName?: string, consistentRead: boolean = false): MappingTemplate { return this.fromString(`{"version" : "2017-02-28", "operation" : "Query", "consistentRead": "${consistentRead}", ${indexName ? `"index" : "${indexName}", ` : ''}${cond.renderTemplate()}}`); } diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json index d13fa5275b9ed..4d9c0271f9d01 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json @@ -1,7 +1,7 @@ { "version": "20.0.0", "files": { - "392e6345c6888314a2c190df55d2deb9821e1ce3ead9eac560725a04ba5d9cc4": { + "a0bb04ca2893fd5677f4200911f8373f19d4382186aae4f0a681f565de52776f": { "source": { "path": "aws-appsync-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "392e6345c6888314a2c190df55d2deb9821e1ce3ead9eac560725a04ba5d9cc4.json", + "objectKey": "a0bb04ca2893fd5677f4200911f8373f19d4382186aae4f0a681f565de52776f.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json index f270706f0c1a6..526026dd77084 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json @@ -135,7 +135,7 @@ "TypeName": "Query", "DataSourceName": "testDataSource", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json index 2796ad10d816e..bab4d9d119984 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json @@ -231,7 +231,7 @@ "typeName": "Query", "dataSourceName": "testDataSource", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.assets.json b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.assets.json index 8d44dcb843f7d..747b08a8cdf57 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.assets.json @@ -14,7 +14,7 @@ } } }, - "551977c2a18f5a3064964ab5d44fcd937c58edfaafc7def14b6c748d0a3985d8": { + "3c058ff5e9f6b2b553f9f10426e55d0cafb7092564eed6824abe7d691adfa845": { "source": { "path": "aws-appsync-integ.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "551977c2a18f5a3064964ab5d44fcd937c58edfaafc7def14b6c748d0a3985d8.json", + "objectKey": "3c058ff5e9f6b2b553f9f10426e55d0cafb7092564eed6824abe7d691adfa845.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.template.json b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.template.json index ecabc4544f465..24dd2d9803ed3 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.template.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.template.json @@ -166,7 +166,7 @@ "TypeName": "Query", "DataSourceName": "testDataSource", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"true\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"false\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "ResponseMappingTemplate": "$util.toJson($ctx.result)" }, "DependsOn": [ @@ -187,7 +187,7 @@ "TypeName": "Query", "DataSourceName": "testDataSource", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/tree.json index dc5e7bd09bc79..c48d6748c07fa 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/tree.json @@ -273,7 +273,7 @@ "typeName": "Query", "dataSourceName": "testDataSource", "kind": "UNIT", - "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"true\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"false\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "responseMappingTemplate": "$util.toJson($ctx.result)" } }, @@ -308,7 +308,7 @@ "typeName": "Query", "dataSourceName": "testDataSource", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.assets.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.assets.json index f1a39cb587d17..5de70582189db 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.assets.json @@ -1,7 +1,7 @@ { "version": "20.0.0", "files": { - "4fca5b2ff088995ca1b32533c8d03ec30fa003d599daa13054e656903ef8e27b": { + "e7ec3e7d76448ac58e7fd4fdea4c307fc3040c8ffd7e27cb9fece556b14cddb8": { "source": { "path": "code-first-schema.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "4fca5b2ff088995ca1b32533c8d03ec30fa003d599daa13054e656903ef8e27b.json", + "objectKey": "e7ec3e7d76448ac58e7fd4fdea4c307fc3040c8ffd7e27cb9fece556b14cddb8.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.template.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.template.json index fe2548e165160..8246458d57eeb 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.template.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.template.json @@ -134,7 +134,7 @@ "TypeName": "Query", "DataSourceName": "planets", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/manifest.json index 0b009deecc70a..26d232336f960 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/manifest.json @@ -68,6 +68,15 @@ "type": "aws:cdk:logicalId", "data": "table8235A42E" } + ], + "codefirstapiQuerygetPlanetsConsistentResolver536F2BBE": [ + { + "type": "aws:cdk:logicalId", + "data": "codefirstapiQuerygetPlanetsConsistentResolver536F2BBE", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "code-first-schema" diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/tree.json index 2dde8fdf61bcf..302158bbd0419 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/tree.json @@ -236,7 +236,7 @@ "typeName": "Query", "dataSourceName": "planets", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.assets.json b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.assets.json index 430455b60c2fa..897d120d27d8b 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.assets.json @@ -1,7 +1,7 @@ { "version": "20.0.0", "files": { - "d219761981d654f39dcb5213a36a8ec4da864463cde985ffde1f03b988cb4572": { + "15f448447c966d7a5b335f9e7c7d12a6c06ee216919c63cb35c1552229982a5b": { "source": { "path": "aws-appsync-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d219761981d654f39dcb5213a36a8ec4da864463cde985ffde1f03b988cb4572.json", + "objectKey": "15f448447c966d7a5b335f9e7c7d12a6c06ee216919c63cb35c1552229982a5b.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.template.json b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.template.json index 3702ab75d5aea..93f78422abe67 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.template.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.template.json @@ -62,7 +62,7 @@ "ApiId" ] }, - "Definition": "type ServiceVersion @aws_api_key {\n version: String!\n}\n\ntype Customer @aws_api_key {\n id: String!\n name: String!\n}\n\ninput SaveCustomerInput {\n name: String!\n}\n\ntype Order @aws_api_key {\n customer: String!\n order: String!\n}\n\ntype Payment @aws_api_key {\n id: String!\n amount: String!\n}\n\ninput PaymentInput {\n amount: String!\n}\n\ntype Query @aws_api_key {\n getServiceVersion: ServiceVersion\n getCustomers: [Customer]\n getCustomer(id: String): Customer\n getCustomerOrdersEq(customer: String): Order\n getCustomerOrdersLt(customer: String): Order\n getCustomerOrdersLe(customer: String): Order\n getCustomerOrdersGt(customer: String): Order\n getCustomerOrdersGe(customer: String): Order\n getCustomerOrdersFilter(customer: String, order: String): Order\n getCustomerOrdersBetween(customer: String, order1: String, order2: String): Order\n getOrderCustomersEq(order: String): [Customer]\n getOrderCustomersLt(order: String): [Customer]\n getOrderCustomersLe(order: String): [Customer]\n getOrderCustomersGt(order: String): [Customer]\n getOrderCustomersGe(order: String): [Customer]\n getOrderCustomersFilter(order: String, customer: String): [Customer]\n getOrderCustomersBetween(order: String, customer1: String, customer2: String): [Customer]\n getPayment(id: String): Payment\n}\n\ninput FirstOrderInput {\n product: String!\n quantity: Int!\n}\n\ntype Mutation @aws_api_key {\n addCustomer(customer: SaveCustomerInput!): Customer\n saveCustomer(id: String!, customer: SaveCustomerInput!): Customer\n removeCustomer(id: String!): Customer\n saveCustomerWithFirstOrder(customer: SaveCustomerInput!, order: FirstOrderInput!, referral: String): Order\n savePayment(payment: PaymentInput!): Payment\n doPostOnAws: String!\n}\n" + "Definition": "type ServiceVersion @aws_api_key {\n version: String!\n}\n\ntype Customer @aws_api_key {\n id: String!\n name: String!\n}\n\ninput SaveCustomerInput {\n name: String!\n}\n\ntype Order @aws_api_key {\n customer: String!\n order: String!\n}\n\ntype Payment @aws_api_key {\n id: String!\n amount: String!\n}\n\ninput PaymentInput {\n amount: String!\n}\n\ntype Query @aws_api_key {\n getServiceVersion: ServiceVersion\n getCustomers: [Customer]\n getCustomersNotConsistent: [Customer]\n getCustomersConsistent: [Customer]\n getCustomer(id: String): Customer\n getCustomerNotConsistent(id: String): Customer\n getCustomerConsistent(id: String): Customer\n getCustomerOrdersEq(customer: String): Order\n getCustomerOrdersLt(customer: String): Order\n getCustomerOrdersLe(customer: String): Order\n getCustomerOrdersGt(customer: String): Order\n getCustomerOrdersGe(customer: String): Order\n getCustomerOrdersNotConsistentEq(customer: String): Order\n getCustomerOrdersNotConsistentLt(customer: String): Order\n getCustomerOrdersNotConsistentLe(customer: String): Order\n getCustomerOrdersNotConsistentGt(customer: String): Order\n getCustomerOrdersNotConsistentGe(customer: String): Order\n getCustomerOrdersConsistentEq(customer: String): Order\n getCustomerOrdersConsistentLt(customer: String): Order\n getCustomerOrdersConsistentLe(customer: String): Order\n getCustomerOrdersConsistentGt(customer: String): Order\n getCustomerOrdersConsistentGe(customer: String): Order\n getCustomerOrdersFilter(customer: String, order: String): Order\n getCustomerOrdersBetween(customer: String, order1: String, order2: String): Order\n getOrderCustomersEq(order: String): [Customer]\n getOrderCustomersLt(order: String): [Customer]\n getOrderCustomersLe(order: String): [Customer]\n getOrderCustomersGt(order: String): [Customer]\n getOrderCustomersGe(order: String): [Customer]\n getOrderCustomersNotConsistentEq(order: String): [Customer]\n getOrderCustomersNotConsistentLt(order: String): [Customer]\n getOrderCustomersNotConsistentLe(order: String): [Customer]\n getOrderCustomersNotConsistentGt(order: String): [Customer]\n getOrderCustomersNotConsistentGe(order: String): [Customer]\n getOrderCustomersConsistentEq(order: String): [Customer]\n getOrderCustomersConsistentLt(order: String): [Customer]\n getOrderCustomersConsistentLe(order: String): [Customer]\n getOrderCustomersConsistentGt(order: String): [Customer]\n getOrderCustomersConsistentGe(order: String): [Customer]\n getOrderCustomersFilter(order: String, customer: String): [Customer]\n getOrderCustomersBetween(order: String, customer1: String, customer2: String): [Customer]\n getPayment(id: String): Payment\n getPaymentConsistent(id: String): Payment\n}\n\ninput FirstOrderInput {\n product: String!\n quantity: Int!\n}\n\ntype Mutation @aws_api_key {\n addCustomer(customer: SaveCustomerInput!): Customer\n saveCustomer(id: String!, customer: SaveCustomerInput!): Customer\n removeCustomer(id: String!): Customer\n saveCustomerWithFirstOrder(customer: SaveCustomerInput!, order: FirstOrderInput!, referral: String): Order\n savePayment(payment: PaymentInput!): Payment\n doPostOnAws: String!\n}\n" } }, "ApiDefaultApiKeyF991C37B": { @@ -214,7 +214,7 @@ "TypeName": "Query", "DataSourceName": "Customer", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -235,6 +235,90 @@ "TypeName": "Query", "DataSourceName": "Customer", "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"false\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "ResponseMappingTemplate": "$util.toJson($ctx.result)" + }, + "DependsOn": [ + "ApicustomerDsFE73DAC5", + "ApiSchema510EECD7" + ] + }, + "ApicustomerDsQuerygetCustomersNotConsistentResolver66499326": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomersNotConsistent", + "TypeName": "Query", + "DataSourceName": "Customer", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApicustomerDsFE73DAC5", + "ApiSchema510EECD7" + ] + }, + "ApicustomerDsQuerygetCustomerNotConsistentResolverE173BDA3": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerNotConsistent", + "TypeName": "Query", + "DataSourceName": "Customer", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"false\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "ResponseMappingTemplate": "$util.toJson($ctx.result)" + }, + "DependsOn": [ + "ApicustomerDsFE73DAC5", + "ApiSchema510EECD7" + ] + }, + "ApicustomerDsQuerygetCustomersConsistentResolver302CA74B": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomersConsistent", + "TypeName": "Query", + "DataSourceName": "Customer", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApicustomerDsFE73DAC5", + "ApiSchema510EECD7" + ] + }, + "ApicustomerDsQuerygetCustomerConsistentResolver0A30CD6C": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerConsistent", + "TypeName": "Query", + "DataSourceName": "Customer", + "Kind": "UNIT", "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"true\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "ResponseMappingTemplate": "$util.toJson($ctx.result)" }, @@ -439,7 +523,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -460,7 +544,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -481,7 +565,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -502,7 +586,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -523,7 +607,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -544,7 +628,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -565,7 +649,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -586,7 +670,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -607,7 +691,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -628,6 +712,426 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersNotConsistentEqResolver242A8314": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersNotConsistentEq", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersNotConsistentEqResolver53CBADD9": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersNotConsistentEq", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersNotConsistentLtResolver5259538F": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersNotConsistentLt", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersNotConsistentLtResolver322C467A": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersNotConsistentLt", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersNotConsistentLeResolver2DB38FDE": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersNotConsistentLe", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersNotConsistentLeResolver8A28C79C": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersNotConsistentLe", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersNotConsistentGtResolverD7C416AD": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersNotConsistentGt", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersNotConsistentGtResolver91BD36C9": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersNotConsistentGt", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersNotConsistentGeResolver0E9FE662": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersNotConsistentGe", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersNotConsistentGeResolver555023D7": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersNotConsistentGe", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersConsistentEqResolver0A400223": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersConsistentEq", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersConsistentEqResolverF54BDAB4": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersConsistentEq", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersConsistentLtResolver73E118EE": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersConsistentLt", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersConsistentLtResolver8B18EA77": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersConsistentLt", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersConsistentLeResolverEA8D11EE": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersConsistentLe", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersConsistentLeResolverB027B939": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersConsistentLe", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersConsistentGtResolverD927E07A": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersConsistentGt", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersConsistentGtResolver58B23E21": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersConsistentGt", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersConsistentGeResolverB8F83696": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersConsistentGe", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersConsistentGeResolver674A5CD5": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersConsistentGe", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, @@ -649,7 +1153,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -670,7 +1174,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -691,7 +1195,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -712,7 +1216,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -833,6 +1337,27 @@ "TypeName": "Query", "DataSourceName": "Payment", "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"false\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "ResponseMappingTemplate": "$util.toJson($ctx.result)" + }, + "DependsOn": [ + "ApipaymentDs95C7AC36", + "ApiSchema510EECD7" + ] + }, + "ApipaymentDsQuerygetPaymentConsistentResolver05C2ACB8": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getPaymentConsistent", + "TypeName": "Query", + "DataSourceName": "Payment", + "Kind": "UNIT", "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"true\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "ResponseMappingTemplate": "$util.toJson($ctx.result)" }, diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/manifest.json index 4aa099c563dfc..4d03a55ced158 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/manifest.json @@ -81,6 +81,30 @@ "data": "ApicustomerDsQuerygetCustomerResolver3649A130" } ], + "/aws-appsync-integ/Api/customerDs/QuerygetCustomersNotConsistentResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsQuerygetCustomersNotConsistentResolver66499326" + } + ], + "/aws-appsync-integ/Api/customerDs/QuerygetCustomerNotConsistentResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsQuerygetCustomerNotConsistentResolverE173BDA3" + } + ], + "/aws-appsync-integ/Api/customerDs/QuerygetCustomersConsistentResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsQuerygetCustomersConsistentResolver302CA74B" + } + ], + "/aws-appsync-integ/Api/customerDs/QuerygetCustomerConsistentResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsQuerygetCustomerConsistentResolver0A30CD6C" + } + ], "/aws-appsync-integ/Api/customerDs/MutationaddCustomerResolver/Resource": [ { "type": "aws:cdk:logicalId", @@ -183,6 +207,126 @@ "data": "ApiorderDsQuerygetOrderCustomersGeResolver0B78B0B4" } ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentEqResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentEqResolver242A8314" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentEqResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersNotConsistentEqResolver53CBADD9" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLtResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentLtResolver5259538F" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentLtResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersNotConsistentLtResolver322C467A" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLeResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentLeResolver2DB38FDE" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentLeResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersNotConsistentLeResolver8A28C79C" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentGtResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentGtResolverD7C416AD" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentGtResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersNotConsistentGtResolver91BD36C9" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentGeResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentGeResolver0E9FE662" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentGeResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersNotConsistentGeResolver555023D7" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentEqResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersConsistentEqResolver0A400223" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentEqResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersConsistentEqResolverF54BDAB4" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentLtResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersConsistentLtResolver73E118EE" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentLtResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersConsistentLtResolver8B18EA77" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentLeResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersConsistentLeResolverEA8D11EE" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentLeResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersConsistentLeResolverB027B939" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentGtResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersConsistentGtResolverD927E07A" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentGtResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersConsistentGtResolver58B23E21" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentGeResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersConsistentGeResolverB8F83696" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentGeResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersConsistentGeResolver674A5CD5" + } + ], "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersFilterResolver/Resource": [ { "type": "aws:cdk:logicalId", @@ -231,6 +375,12 @@ "data": "ApipaymentDsQuerygetPaymentResolverD172BFC9" } ], + "/aws-appsync-integ/Api/paymentDs/QuerygetPaymentConsistentResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApipaymentDsQuerygetPaymentConsistentResolver05C2ACB8" + } + ], "/aws-appsync-integ/Api/paymentDs/MutationsavePaymentResolver/Resource": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/tree.json index fbafbe1ee3f64..5652be526833c 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/tree.json @@ -109,7 +109,7 @@ "ApiId" ] }, - "definition": "type ServiceVersion @aws_api_key {\n version: String!\n}\n\ntype Customer @aws_api_key {\n id: String!\n name: String!\n}\n\ninput SaveCustomerInput {\n name: String!\n}\n\ntype Order @aws_api_key {\n customer: String!\n order: String!\n}\n\ntype Payment @aws_api_key {\n id: String!\n amount: String!\n}\n\ninput PaymentInput {\n amount: String!\n}\n\ntype Query @aws_api_key {\n getServiceVersion: ServiceVersion\n getCustomers: [Customer]\n getCustomer(id: String): Customer\n getCustomerOrdersEq(customer: String): Order\n getCustomerOrdersLt(customer: String): Order\n getCustomerOrdersLe(customer: String): Order\n getCustomerOrdersGt(customer: String): Order\n getCustomerOrdersGe(customer: String): Order\n getCustomerOrdersFilter(customer: String, order: String): Order\n getCustomerOrdersBetween(customer: String, order1: String, order2: String): Order\n getOrderCustomersEq(order: String): [Customer]\n getOrderCustomersLt(order: String): [Customer]\n getOrderCustomersLe(order: String): [Customer]\n getOrderCustomersGt(order: String): [Customer]\n getOrderCustomersGe(order: String): [Customer]\n getOrderCustomersFilter(order: String, customer: String): [Customer]\n getOrderCustomersBetween(order: String, customer1: String, customer2: String): [Customer]\n getPayment(id: String): Payment\n}\n\ninput FirstOrderInput {\n product: String!\n quantity: Int!\n}\n\ntype Mutation @aws_api_key {\n addCustomer(customer: SaveCustomerInput!): Customer\n saveCustomer(id: String!, customer: SaveCustomerInput!): Customer\n removeCustomer(id: String!): Customer\n saveCustomerWithFirstOrder(customer: SaveCustomerInput!, order: FirstOrderInput!, referral: String): Order\n savePayment(payment: PaymentInput!): Payment\n doPostOnAws: String!\n}\n" + "definition": "type ServiceVersion @aws_api_key {\n version: String!\n}\n\ntype Customer @aws_api_key {\n id: String!\n name: String!\n}\n\ninput SaveCustomerInput {\n name: String!\n}\n\ntype Order @aws_api_key {\n customer: String!\n order: String!\n}\n\ntype Payment @aws_api_key {\n id: String!\n amount: String!\n}\n\ninput PaymentInput {\n amount: String!\n}\n\ntype Query @aws_api_key {\n getServiceVersion: ServiceVersion\n getCustomers: [Customer]\n getCustomersNotConsistent: [Customer]\n getCustomersConsistent: [Customer]\n getCustomer(id: String): Customer\n getCustomerNotConsistent(id: String): Customer\n getCustomerConsistent(id: String): Customer\n getCustomerOrdersEq(customer: String): Order\n getCustomerOrdersLt(customer: String): Order\n getCustomerOrdersLe(customer: String): Order\n getCustomerOrdersGt(customer: String): Order\n getCustomerOrdersGe(customer: String): Order\n getCustomerOrdersNotConsistentEq(customer: String): Order\n getCustomerOrdersNotConsistentLt(customer: String): Order\n getCustomerOrdersNotConsistentLe(customer: String): Order\n getCustomerOrdersNotConsistentGt(customer: String): Order\n getCustomerOrdersNotConsistentGe(customer: String): Order\n getCustomerOrdersConsistentEq(customer: String): Order\n getCustomerOrdersConsistentLt(customer: String): Order\n getCustomerOrdersConsistentLe(customer: String): Order\n getCustomerOrdersConsistentGt(customer: String): Order\n getCustomerOrdersConsistentGe(customer: String): Order\n getCustomerOrdersFilter(customer: String, order: String): Order\n getCustomerOrdersBetween(customer: String, order1: String, order2: String): Order\n getOrderCustomersEq(order: String): [Customer]\n getOrderCustomersLt(order: String): [Customer]\n getOrderCustomersLe(order: String): [Customer]\n getOrderCustomersGt(order: String): [Customer]\n getOrderCustomersGe(order: String): [Customer]\n getOrderCustomersNotConsistentEq(order: String): [Customer]\n getOrderCustomersNotConsistentLt(order: String): [Customer]\n getOrderCustomersNotConsistentLe(order: String): [Customer]\n getOrderCustomersNotConsistentGt(order: String): [Customer]\n getOrderCustomersNotConsistentGe(order: String): [Customer]\n getOrderCustomersConsistentEq(order: String): [Customer]\n getOrderCustomersConsistentLt(order: String): [Customer]\n getOrderCustomersConsistentLe(order: String): [Customer]\n getOrderCustomersConsistentGt(order: String): [Customer]\n getOrderCustomersConsistentGe(order: String): [Customer]\n getOrderCustomersFilter(order: String, customer: String): [Customer]\n getOrderCustomersBetween(order: String, customer1: String, customer2: String): [Customer]\n getPayment(id: String): Payment\n getPaymentConsistent(id: String): Payment\n}\n\ninput FirstOrderInput {\n product: String!\n quantity: Int!\n}\n\ntype Mutation @aws_api_key {\n addCustomer(customer: SaveCustomerInput!): Customer\n saveCustomer(id: String!, customer: SaveCustomerInput!): Customer\n removeCustomer(id: String!): Customer\n saveCustomerWithFirstOrder(customer: SaveCustomerInput!, order: FirstOrderInput!, referral: String): Order\n savePayment(payment: PaymentInput!): Payment\n doPostOnAws: String!\n}\n" } }, "constructInfo": { @@ -358,7 +358,7 @@ "typeName": "Query", "dataSourceName": "Customer", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -393,6 +393,146 @@ "typeName": "Query", "dataSourceName": "Customer", "kind": "UNIT", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"false\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "responseMappingTemplate": "$util.toJson($ctx.result)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomersNotConsistentResolver": { + "id": "QuerygetCustomersNotConsistentResolver", + "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomersNotConsistentResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomersNotConsistentResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomersNotConsistent", + "typeName": "Query", + "dataSourceName": "Customer", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerNotConsistentResolver": { + "id": "QuerygetCustomerNotConsistentResolver", + "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomerNotConsistentResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomerNotConsistentResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerNotConsistent", + "typeName": "Query", + "dataSourceName": "Customer", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"false\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "responseMappingTemplate": "$util.toJson($ctx.result)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomersConsistentResolver": { + "id": "QuerygetCustomersConsistentResolver", + "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomersConsistentResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomersConsistentResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomersConsistent", + "typeName": "Query", + "dataSourceName": "Customer", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerConsistentResolver": { + "id": "QuerygetCustomerConsistentResolver", + "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomerConsistentResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomerConsistentResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerConsistent", + "typeName": "Query", + "dataSourceName": "Customer", + "kind": "UNIT", "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"true\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "responseMappingTemplate": "$util.toJson($ctx.result)" } @@ -721,7 +861,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -756,7 +896,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -791,7 +931,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -826,7 +966,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -861,7 +1001,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -896,7 +1036,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -931,7 +1071,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -966,7 +1106,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1001,7 +1141,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1036,7 +1176,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1051,13 +1191,13 @@ "version": "0.0.0" } }, - "QuerygetCustomerOrdersFilterResolver": { - "id": "QuerygetCustomerOrdersFilterResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersFilterResolver", + "QuerygetCustomerOrdersNotConsistentEqResolver": { + "id": "QuerygetCustomerOrdersNotConsistentEqResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentEqResolver", "children": { "Resource": { "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersFilterResolver/Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentEqResolver/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", "aws:cdk:cloudformation:props": { @@ -1067,11 +1207,11 @@ "ApiId" ] }, - "fieldName": "getCustomerOrdersFilter", + "fieldName": "getCustomerOrdersNotConsistentEq", "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1086,13 +1226,13 @@ "version": "0.0.0" } }, - "QuerygetCustomerOrdersBetweenResolver": { - "id": "QuerygetCustomerOrdersBetweenResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersBetweenResolver", + "QuerygetOrderCustomersNotConsistentEqResolver": { + "id": "QuerygetOrderCustomersNotConsistentEqResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentEqResolver", "children": { "Resource": { "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersBetweenResolver/Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentEqResolver/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", "aws:cdk:cloudformation:props": { @@ -1102,11 +1242,11 @@ "ApiId" ] }, - "fieldName": "getCustomerOrdersBetween", + "fieldName": "getOrderCustomersNotConsistentEq", "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1121,13 +1261,13 @@ "version": "0.0.0" } }, - "QuerygetOrderCustomersFilterResolver": { - "id": "QuerygetOrderCustomersFilterResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersFilterResolver", + "QuerygetCustomerOrdersNotConsistentLtResolver": { + "id": "QuerygetCustomerOrdersNotConsistentLtResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLtResolver", "children": { "Resource": { "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersFilterResolver/Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLtResolver/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", "aws:cdk:cloudformation:props": { @@ -1137,11 +1277,11 @@ "ApiId" ] }, - "fieldName": "getOrderCustomersFilter", + "fieldName": "getCustomerOrdersNotConsistentLt", "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1156,13 +1296,13 @@ "version": "0.0.0" } }, - "QuerygetOrderCustomersBetweenResolver": { - "id": "QuerygetOrderCustomersBetweenResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersBetweenResolver", + "QuerygetOrderCustomersNotConsistentLtResolver": { + "id": "QuerygetOrderCustomersNotConsistentLtResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentLtResolver", "children": { "Resource": { "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersBetweenResolver/Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentLtResolver/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", "aws:cdk:cloudformation:props": { @@ -1172,11 +1312,11 @@ "ApiId" ] }, - "fieldName": "getOrderCustomersBetween", + "fieldName": "getOrderCustomersNotConsistentLt", "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1190,111 +1330,811 @@ "fqn": "@aws-cdk/aws-appsync.Resolver", "version": "0.0.0" } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.DynamoDbDataSource", - "version": "0.0.0" - } - }, - "paymentDs": { - "id": "paymentDs", - "path": "aws-appsync-integ/Api/paymentDs", - "children": { - "ServiceRole": { - "id": "ServiceRole", - "path": "aws-appsync-integ/Api/paymentDs/ServiceRole", + }, + "QuerygetCustomerOrdersNotConsistentLeResolver": { + "id": "QuerygetCustomerOrdersNotConsistentLeResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLeResolver", "children": { "Resource": { "id": "Resource", - "path": "aws-appsync-integ/Api/paymentDs/ServiceRole/Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLeResolver/Resource", "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", "aws:cdk:cloudformation:props": { - "assumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersNotConsistentLe", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-appsync-integ/Api/paymentDs/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/paymentDs/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:BatchWriteItem", - "dynamodb:ConditionCheckItem", - "dynamodb:DeleteItem", - "dynamodb:DescribeTable", - "dynamodb:GetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:PutItem", - "dynamodb:Query", - "dynamodb:Scan", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/PaymentTable" - ] - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "policyName": "ApipaymentDsServiceRoleDefaultPolicy528E42B0", - "roles": [ - { - "Ref": "ApipaymentDsServiceRole0DAC58D6" - } - ] - } - }, + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersNotConsistentLeResolver": { + "id": "QuerygetOrderCustomersNotConsistentLeResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentLeResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentLeResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersNotConsistentLe", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersNotConsistentGtResolver": { + "id": "QuerygetCustomerOrdersNotConsistentGtResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentGtResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentGtResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersNotConsistentGt", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersNotConsistentGtResolver": { + "id": "QuerygetOrderCustomersNotConsistentGtResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentGtResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentGtResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersNotConsistentGt", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersNotConsistentGeResolver": { + "id": "QuerygetCustomerOrdersNotConsistentGeResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentGeResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentGeResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersNotConsistentGe", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersNotConsistentGeResolver": { + "id": "QuerygetOrderCustomersNotConsistentGeResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentGeResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentGeResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersNotConsistentGe", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersConsistentEqResolver": { + "id": "QuerygetCustomerOrdersConsistentEqResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentEqResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentEqResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersConsistentEq", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersConsistentEqResolver": { + "id": "QuerygetOrderCustomersConsistentEqResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentEqResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentEqResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersConsistentEq", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersConsistentLtResolver": { + "id": "QuerygetCustomerOrdersConsistentLtResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentLtResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentLtResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersConsistentLt", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersConsistentLtResolver": { + "id": "QuerygetOrderCustomersConsistentLtResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentLtResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentLtResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersConsistentLt", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersConsistentLeResolver": { + "id": "QuerygetCustomerOrdersConsistentLeResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentLeResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentLeResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersConsistentLe", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersConsistentLeResolver": { + "id": "QuerygetOrderCustomersConsistentLeResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentLeResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentLeResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersConsistentLe", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersConsistentGtResolver": { + "id": "QuerygetCustomerOrdersConsistentGtResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentGtResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentGtResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersConsistentGt", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersConsistentGtResolver": { + "id": "QuerygetOrderCustomersConsistentGtResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentGtResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentGtResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersConsistentGt", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersConsistentGeResolver": { + "id": "QuerygetCustomerOrdersConsistentGeResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentGeResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentGeResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersConsistentGe", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersConsistentGeResolver": { + "id": "QuerygetOrderCustomersConsistentGeResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentGeResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentGeResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersConsistentGe", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersFilterResolver": { + "id": "QuerygetCustomerOrdersFilterResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersFilterResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersFilterResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersFilter", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersBetweenResolver": { + "id": "QuerygetCustomerOrdersBetweenResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersBetweenResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersBetweenResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersBetween", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersFilterResolver": { + "id": "QuerygetOrderCustomersFilterResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersFilterResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersFilterResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersFilter", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersBetweenResolver": { + "id": "QuerygetOrderCustomersBetweenResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersBetweenResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersBetweenResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersBetween", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.DynamoDbDataSource", + "version": "0.0.0" + } + }, + "paymentDs": { + "id": "paymentDs", + "path": "aws-appsync-integ/Api/paymentDs", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-appsync-integ/Api/paymentDs/ServiceRole", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/paymentDs/ServiceRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-appsync-integ/Api/paymentDs/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/paymentDs/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:BatchWriteItem", + "dynamodb:ConditionCheckItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + "dynamodb:GetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:PutItem", + "dynamodb:Query", + "dynamodb:Scan", + "dynamodb:UpdateItem" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/PaymentTable" + ] + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "ApipaymentDsServiceRoleDefaultPolicy528E42B0", + "roles": [ + { + "Ref": "ApipaymentDsServiceRole0DAC58D6" + } + ] + } + }, "constructInfo": { "fqn": "@aws-cdk/aws-iam.CfnPolicy", "version": "0.0.0" @@ -1365,6 +2205,41 @@ "typeName": "Query", "dataSourceName": "Payment", "kind": "UNIT", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"false\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "responseMappingTemplate": "$util.toJson($ctx.result)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetPaymentConsistentResolver": { + "id": "QuerygetPaymentConsistentResolver", + "path": "aws-appsync-integ/Api/paymentDs/QuerygetPaymentConsistentResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/paymentDs/QuerygetPaymentConsistentResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getPaymentConsistent", + "typeName": "Query", + "dataSourceName": "Payment", + "kind": "UNIT", "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"true\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "responseMappingTemplate": "$util.toJson($ctx.result)" } diff --git a/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts b/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts index edd0f41c1dc8e..a4ebc3105209e 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts @@ -46,7 +46,7 @@ const testDS = api.addDynamoDbDataSource('ds', testTable); testDS.createResolver({ typeName: 'Query', fieldName: 'getTests', - requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(true), + requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(), responseMappingTemplate: appsync.MappingTemplate.dynamoDbResultList(), }); diff --git a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts index 37cebc84981c4..f2e8cb4145732 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts @@ -49,7 +49,7 @@ const testDS = api.addDynamoDbDataSource('testDataSource', testTable); testDS.createResolver({ typeName: 'Query', fieldName: 'getTests', - requestMappingTemplate: MappingTemplate.dynamoDbScanTable(true), + requestMappingTemplate: MappingTemplate.dynamoDbScanTable(), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.ts b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.ts index 4166b7a2f31ba..86496338f585b 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.ts @@ -69,14 +69,14 @@ const testDS = api.addDynamoDbDataSource('ds', testTable, { name: 'testDataSourc testDS.createResolver({ typeName: 'Query', fieldName: 'getTest', - requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id', true), + requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id'), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); testDS.createResolver({ typeName: 'Query', fieldName: 'getTests', - requestMappingTemplate: MappingTemplate.dynamoDbScanTable(true), + requestMappingTemplate: MappingTemplate.dynamoDbScanTable(), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.ts b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.ts index ad1003325fde5..6475b0bfae971 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.ts @@ -67,7 +67,7 @@ const species = api.addType(new appsync.ObjectType('Species', { api.addQuery('getPlanets', new appsync.ResolvableField({ returnType: planet.attribute({ isList: true }), dataSource: tableDS, - requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(true), + requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(), responseMappingTemplate: appsync.MappingTemplate.dynamoDbResultList(), })); diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql.graphql b/packages/@aws-cdk/aws-appsync/test/integ.graphql.graphql index 345979e12f169..d418ab54de7a5 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.graphql +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql.graphql @@ -28,12 +28,26 @@ input PaymentInput { type Query @aws_api_key { getServiceVersion: ServiceVersion getCustomers: [Customer] + getCustomersNotConsistent: [Customer] + getCustomersConsistent: [Customer] getCustomer(id: String): Customer + getCustomerNotConsistent(id: String): Customer + getCustomerConsistent(id: String): Customer getCustomerOrdersEq(customer: String): Order getCustomerOrdersLt(customer: String): Order getCustomerOrdersLe(customer: String): Order getCustomerOrdersGt(customer: String): Order getCustomerOrdersGe(customer: String): Order + getCustomerOrdersNotConsistentEq(customer: String): Order + getCustomerOrdersNotConsistentLt(customer: String): Order + getCustomerOrdersNotConsistentLe(customer: String): Order + getCustomerOrdersNotConsistentGt(customer: String): Order + getCustomerOrdersNotConsistentGe(customer: String): Order + getCustomerOrdersConsistentEq(customer: String): Order + getCustomerOrdersConsistentLt(customer: String): Order + getCustomerOrdersConsistentLe(customer: String): Order + getCustomerOrdersConsistentGt(customer: String): Order + getCustomerOrdersConsistentGe(customer: String): Order getCustomerOrdersFilter(customer: String, order: String): Order getCustomerOrdersBetween(customer: String, order1: String, order2: String): Order getOrderCustomersEq(order: String): [Customer] @@ -41,9 +55,20 @@ type Query @aws_api_key { getOrderCustomersLe(order: String): [Customer] getOrderCustomersGt(order: String): [Customer] getOrderCustomersGe(order: String): [Customer] + getOrderCustomersNotConsistentEq(order: String): [Customer] + getOrderCustomersNotConsistentLt(order: String): [Customer] + getOrderCustomersNotConsistentLe(order: String): [Customer] + getOrderCustomersNotConsistentGt(order: String): [Customer] + getOrderCustomersNotConsistentGe(order: String): [Customer] + getOrderCustomersConsistentEq(order: String): [Customer] + getOrderCustomersConsistentLt(order: String): [Customer] + getOrderCustomersConsistentLe(order: String): [Customer] + getOrderCustomersConsistentGt(order: String): [Customer] + getOrderCustomersConsistentGe(order: String): [Customer] getOrderCustomersFilter(order: String, customer: String): [Customer] getOrderCustomersBetween(order: String, customer1: String, customer2: String): [Customer] getPayment(id: String): Payment + getPaymentConsistent(id: String): Payment } input FirstOrderInput { diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts b/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts index 58bd3b59c7cf7..fa0feb5ae2921 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts @@ -114,12 +114,36 @@ const paymentDS = api.addDynamoDbDataSource('paymentDs', paymentTable, { name: ' customerDS.createResolver({ typeName: 'Query', fieldName: 'getCustomers', - requestMappingTemplate: MappingTemplate.dynamoDbScanTable(true), + requestMappingTemplate: MappingTemplate.dynamoDbScanTable(), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); customerDS.createResolver({ typeName: 'Query', fieldName: 'getCustomer', + requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id'), + responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), +}); +customerDS.createResolver({ + typeName: 'Query', + fieldName: 'getCustomersNotConsistent', + requestMappingTemplate: MappingTemplate.dynamoDbScanTable(false), + responseMappingTemplate: MappingTemplate.dynamoDbResultList(), +}); +customerDS.createResolver({ + typeName: 'Query', + fieldName: 'getCustomerNotConsistent', + requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id', false), + responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), +}); +customerDS.createResolver({ + typeName: 'Query', + fieldName: 'getCustomersConsistent', + requestMappingTemplate: MappingTemplate.dynamoDbScanTable(true), + responseMappingTemplate: MappingTemplate.dynamoDbResultList(), +}); +customerDS.createResolver({ + typeName: 'Query', + fieldName: 'getCustomerConsistent', requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id', true), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); @@ -165,13 +189,41 @@ for (const { suffix, op } of ops) { orderDS.createResolver({ typeName: 'Query', fieldName: 'getCustomerOrders' + suffix, - requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('customer', 'customer'), true), + requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('customer', 'customer')), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); orderDS.createResolver({ typeName: 'Query', fieldName: 'getOrderCustomers' + suffix, - requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('order', 'order'), true, 'orderIndex'), + requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('order', 'order'), 'orderIndex'), + responseMappingTemplate: MappingTemplate.dynamoDbResultList(), + }); +} +for (const { suffix, op } of ops) { + orderDS.createResolver({ + typeName: 'Query', + fieldName: 'getCustomerOrdersNotConsistent' + suffix, + requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('customer', 'customer'), undefined, false), + responseMappingTemplate: MappingTemplate.dynamoDbResultList(), + }); + orderDS.createResolver({ + typeName: 'Query', + fieldName: 'getOrderCustomersNotConsistent' + suffix, + requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('order', 'order'), 'orderIndex', false), + responseMappingTemplate: MappingTemplate.dynamoDbResultList(), + }); +} +for (const { suffix, op } of ops) { + orderDS.createResolver({ + typeName: 'Query', + fieldName: 'getCustomerOrdersConsistent' + suffix, + requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('customer', 'customer'), undefined, true), + responseMappingTemplate: MappingTemplate.dynamoDbResultList(), + }); + orderDS.createResolver({ + typeName: 'Query', + fieldName: 'getOrderCustomersConsistent' + suffix, + requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('order', 'order'), 'orderIndex', true), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); } @@ -179,34 +231,40 @@ orderDS.createResolver({ typeName: 'Query', fieldName: 'getCustomerOrdersFilter', requestMappingTemplate: MappingTemplate.dynamoDbQuery( - KeyCondition.eq('customer', 'customer').and(KeyCondition.beginsWith('order', 'order')), true), + KeyCondition.eq('customer', 'customer').and(KeyCondition.beginsWith('order', 'order'))), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); orderDS.createResolver({ typeName: 'Query', fieldName: 'getCustomerOrdersBetween', requestMappingTemplate: MappingTemplate.dynamoDbQuery( - KeyCondition.eq('customer', 'customer').and(KeyCondition.between('order', 'order1', 'order2')), true), + KeyCondition.eq('customer', 'customer').and(KeyCondition.between('order', 'order1', 'order2'))), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); orderDS.createResolver({ typeName: 'Query', fieldName: 'getOrderCustomersFilter', requestMappingTemplate: MappingTemplate.dynamoDbQuery( - KeyCondition.eq('order', 'order').and(KeyCondition.beginsWith('customer', 'customer')), true), + KeyCondition.eq('order', 'order').and(KeyCondition.beginsWith('customer', 'customer'))), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); orderDS.createResolver({ typeName: 'Query', fieldName: 'getOrderCustomersBetween', requestMappingTemplate: MappingTemplate.dynamoDbQuery( - KeyCondition.eq('order', 'order').and(KeyCondition.between('customer', 'customer1', 'customer2')), true, 'orderIndex'), + KeyCondition.eq('order', 'order').and(KeyCondition.between('customer', 'customer1', 'customer2')), 'orderIndex'), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); paymentDS.createResolver({ typeName: 'Query', fieldName: 'getPayment', + requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id'), + responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), +}); +paymentDS.createResolver({ + typeName: 'Query', + fieldName: 'getPaymentConsistent', requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id', true), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); From a81b7452b81c8e77b531b2bc65da3d38c59c56e0 Mon Sep 17 00:00:00 2001 From: halfmoontonight <17865422138@163.com> Date: Thu, 30 Jun 2022 20:38:28 -0400 Subject: [PATCH 04/15] add reference for consistentRead in README.md --- packages/@aws-cdk/aws-appsync/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index a5679ee9273d2..73befccaf51d1 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -77,6 +77,9 @@ const demoTable = new dynamodb.Table(this, 'DemoTable', { const demoDS = api.addDynamoDbDataSource('demoDataSource', demoTable); // Resolver for the Query "getDemos" that scans the DynamoDb table and returns the entire list. +// Resolver Mapping Template Reference: +// https://docs.aws.amazon.com/appsync/latest/devguide/resolver-mapping-template-reference-dynamodb.html +//parameter for the dynamoDbScanTable: consistentRead, whether or not to perform a strongly consistent read with DynamoDB. This is optional, and defaults to false. demoDS.createResolver({ typeName: 'Query', fieldName: 'getDemos', From cf44a76ee4e2592af8f5a14937d6c18dc3aee7cc Mon Sep 17 00:00:00 2001 From: halfmoontonight <17865422138@163.com> Date: Thu, 30 Jun 2022 22:24:41 -0400 Subject: [PATCH 05/15] pass the consistentRead as boolean in mapping-template --- .../aws-appsync/lib/mapping-template.ts | 6 +- .../aws-appsync-integ.assets.json | 4 +- .../aws-appsync-integ.template.json | 2 +- .../test/auth-apikey.integ.snapshot/tree.json | 2 +- .../aws-appsync-integ.assets.json | 4 +- .../aws-appsync-integ.template.json | 4 +- .../test/graphql-iam.integ.snapshot/tree.json | 4 +- .../code-first-schema.assets.json | 4 +- .../code-first-schema.template.json | 2 +- .../manifest.json | 9 -- .../graphql-schema.integ.snapshot/tree.json | 2 +- .../aws-appsync-integ.assets.json | 4 +- .../aws-appsync-integ.template.json | 84 +++++++++---------- .../test/graphql.integ.snapshot/tree.json | 84 +++++++++---------- 14 files changed, 103 insertions(+), 112 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts b/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts index b34a4b662ece0..338990d8a4b31 100644 --- a/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts +++ b/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts @@ -37,7 +37,7 @@ export abstract class MappingTemplate { * Mapping template to scan a DynamoDB table to fetch all entries */ public static dynamoDbScanTable(consistentRead: boolean = false): MappingTemplate { - return this.fromString(`{"version" : "2017-02-28", "operation" : "Scan", "consistentRead": "${consistentRead}"}`); + return this.fromString(`{"version" : "2017-02-28", "operation" : "Scan", "consistentRead": ${consistentRead}}`); } /** @@ -46,7 +46,7 @@ export abstract class MappingTemplate { * @param cond the key condition for the query */ public static dynamoDbQuery(cond: KeyCondition, indexName?: string, consistentRead: boolean = false): MappingTemplate { - return this.fromString(`{"version" : "2017-02-28", "operation" : "Query", "consistentRead": "${consistentRead}", ${indexName ? `"index" : "${indexName}", ` : ''}${cond.renderTemplate()}}`); + return this.fromString(`{"version" : "2017-02-28", "operation" : "Query", "consistentRead": ${consistentRead}, ${indexName ? `"index" : "${indexName}", ` : ''}${cond.renderTemplate()}}`); } /** @@ -56,7 +56,7 @@ export abstract class MappingTemplate { * @param idArg the name of the Query argument */ public static dynamoDbGetItem(keyName: string, idArg: string, consistentRead: boolean = false): MappingTemplate { - return this.fromString(`{"version": "2017-02-28", "operation": "GetItem", "consistentRead": "${consistentRead}", "key": {"${keyName}": $util.dynamodb.toDynamoDBJson($ctx.args.${idArg})}}`); + return this.fromString(`{"version": "2017-02-28", "operation": "GetItem", "consistentRead": ${consistentRead}, "key": {"${keyName}": $util.dynamodb.toDynamoDBJson($ctx.args.${idArg})}}`); } /** diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json index 4d9c0271f9d01..cffe0a1d20ab0 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json @@ -1,7 +1,7 @@ { "version": "20.0.0", "files": { - "a0bb04ca2893fd5677f4200911f8373f19d4382186aae4f0a681f565de52776f": { + "bfd02a80e0acec2e7605e7bb0ba6d05fb7cb99c262302124de493ee710fa7e88": { "source": { "path": "aws-appsync-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a0bb04ca2893fd5677f4200911f8373f19d4382186aae4f0a681f565de52776f.json", + "objectKey": "bfd02a80e0acec2e7605e7bb0ba6d05fb7cb99c262302124de493ee710fa7e88.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json index 526026dd77084..dc500b5f367f9 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json @@ -135,7 +135,7 @@ "TypeName": "Query", "DataSourceName": "testDataSource", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json index bab4d9d119984..4715745d24847 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json @@ -231,7 +231,7 @@ "typeName": "Query", "dataSourceName": "testDataSource", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.assets.json b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.assets.json index 747b08a8cdf57..e11315031502f 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.assets.json @@ -14,7 +14,7 @@ } } }, - "3c058ff5e9f6b2b553f9f10426e55d0cafb7092564eed6824abe7d691adfa845": { + "c06c582f69e71eae955ab50693deb45f0836b7837ef3184a737f87c4bf7952a4": { "source": { "path": "aws-appsync-integ.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3c058ff5e9f6b2b553f9f10426e55d0cafb7092564eed6824abe7d691adfa845.json", + "objectKey": "c06c582f69e71eae955ab50693deb45f0836b7837ef3184a737f87c4bf7952a4.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.template.json b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.template.json index 24dd2d9803ed3..f5a5b4f3ba0dd 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.template.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.template.json @@ -166,7 +166,7 @@ "TypeName": "Query", "DataSourceName": "testDataSource", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"false\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": false, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "ResponseMappingTemplate": "$util.toJson($ctx.result)" }, "DependsOn": [ @@ -187,7 +187,7 @@ "TypeName": "Query", "DataSourceName": "testDataSource", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/tree.json index c48d6748c07fa..7ead3eb9d1673 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/tree.json @@ -273,7 +273,7 @@ "typeName": "Query", "dataSourceName": "testDataSource", "kind": "UNIT", - "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"false\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": false, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "responseMappingTemplate": "$util.toJson($ctx.result)" } }, @@ -308,7 +308,7 @@ "typeName": "Query", "dataSourceName": "testDataSource", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.assets.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.assets.json index 5de70582189db..2154620746877 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.assets.json @@ -1,7 +1,7 @@ { "version": "20.0.0", "files": { - "e7ec3e7d76448ac58e7fd4fdea4c307fc3040c8ffd7e27cb9fece556b14cddb8": { + "56d1a7b725a78aa83ffacc3ba1d3ae4b4c2fa61c3caff19dafd5f77c1e0333c3": { "source": { "path": "code-first-schema.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e7ec3e7d76448ac58e7fd4fdea4c307fc3040c8ffd7e27cb9fece556b14cddb8.json", + "objectKey": "56d1a7b725a78aa83ffacc3ba1d3ae4b4c2fa61c3caff19dafd5f77c1e0333c3.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.template.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.template.json index 8246458d57eeb..9bd2d92360b1a 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.template.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.template.json @@ -134,7 +134,7 @@ "TypeName": "Query", "DataSourceName": "planets", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/manifest.json index 26d232336f960..0b009deecc70a 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/manifest.json @@ -68,15 +68,6 @@ "type": "aws:cdk:logicalId", "data": "table8235A42E" } - ], - "codefirstapiQuerygetPlanetsConsistentResolver536F2BBE": [ - { - "type": "aws:cdk:logicalId", - "data": "codefirstapiQuerygetPlanetsConsistentResolver536F2BBE", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "code-first-schema" diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/tree.json index 302158bbd0419..969d960f688b5 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/tree.json @@ -236,7 +236,7 @@ "typeName": "Query", "dataSourceName": "planets", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.assets.json b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.assets.json index 897d120d27d8b..ed6102bf128f4 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.assets.json @@ -1,7 +1,7 @@ { "version": "20.0.0", "files": { - "15f448447c966d7a5b335f9e7c7d12a6c06ee216919c63cb35c1552229982a5b": { + "410a11ff94f45720614bec412ef8a8f4aa68e8f98e181bbd4b98fb47cbb76284": { "source": { "path": "aws-appsync-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "15f448447c966d7a5b335f9e7c7d12a6c06ee216919c63cb35c1552229982a5b.json", + "objectKey": "410a11ff94f45720614bec412ef8a8f4aa68e8f98e181bbd4b98fb47cbb76284.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.template.json b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.template.json index 93f78422abe67..e72b2a5388458 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.template.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.template.json @@ -214,7 +214,7 @@ "TypeName": "Query", "DataSourceName": "Customer", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -235,7 +235,7 @@ "TypeName": "Query", "DataSourceName": "Customer", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"false\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": false, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "ResponseMappingTemplate": "$util.toJson($ctx.result)" }, "DependsOn": [ @@ -256,7 +256,7 @@ "TypeName": "Query", "DataSourceName": "Customer", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -277,7 +277,7 @@ "TypeName": "Query", "DataSourceName": "Customer", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"false\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": false, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "ResponseMappingTemplate": "$util.toJson($ctx.result)" }, "DependsOn": [ @@ -298,7 +298,7 @@ "TypeName": "Query", "DataSourceName": "Customer", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": true}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -319,7 +319,7 @@ "TypeName": "Query", "DataSourceName": "Customer", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"true\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": true, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "ResponseMappingTemplate": "$util.toJson($ctx.result)" }, "DependsOn": [ @@ -523,7 +523,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -544,7 +544,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -565,7 +565,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -586,7 +586,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -607,7 +607,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -628,7 +628,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -649,7 +649,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -670,7 +670,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -691,7 +691,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -712,7 +712,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -733,7 +733,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -754,7 +754,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -775,7 +775,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -796,7 +796,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -817,7 +817,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -838,7 +838,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -859,7 +859,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -880,7 +880,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -901,7 +901,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -922,7 +922,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -943,7 +943,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -964,7 +964,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -985,7 +985,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -1006,7 +1006,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -1027,7 +1027,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -1048,7 +1048,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -1069,7 +1069,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -1090,7 +1090,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -1111,7 +1111,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -1132,7 +1132,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -1153,7 +1153,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -1174,7 +1174,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -1195,7 +1195,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -1216,7 +1216,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -1337,7 +1337,7 @@ "TypeName": "Query", "DataSourceName": "Payment", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"false\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": false, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "ResponseMappingTemplate": "$util.toJson($ctx.result)" }, "DependsOn": [ @@ -1358,7 +1358,7 @@ "TypeName": "Query", "DataSourceName": "Payment", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"true\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": true, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "ResponseMappingTemplate": "$util.toJson($ctx.result)" }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/tree.json index 5652be526833c..5137a0e251007 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/tree.json @@ -358,7 +358,7 @@ "typeName": "Query", "dataSourceName": "Customer", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -393,7 +393,7 @@ "typeName": "Query", "dataSourceName": "Customer", "kind": "UNIT", - "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"false\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": false, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "responseMappingTemplate": "$util.toJson($ctx.result)" } }, @@ -428,7 +428,7 @@ "typeName": "Query", "dataSourceName": "Customer", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"false\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -463,7 +463,7 @@ "typeName": "Query", "dataSourceName": "Customer", "kind": "UNIT", - "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"false\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": false, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "responseMappingTemplate": "$util.toJson($ctx.result)" } }, @@ -498,7 +498,7 @@ "typeName": "Query", "dataSourceName": "Customer", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": \"true\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": true}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -533,7 +533,7 @@ "typeName": "Query", "dataSourceName": "Customer", "kind": "UNIT", - "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"true\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": true, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "responseMappingTemplate": "$util.toJson($ctx.result)" } }, @@ -861,7 +861,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -896,7 +896,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -931,7 +931,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -966,7 +966,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1001,7 +1001,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1036,7 +1036,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1071,7 +1071,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1106,7 +1106,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1141,7 +1141,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1176,7 +1176,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1211,7 +1211,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1246,7 +1246,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1281,7 +1281,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1316,7 +1316,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1351,7 +1351,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1386,7 +1386,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1421,7 +1421,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1456,7 +1456,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1491,7 +1491,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1526,7 +1526,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1561,7 +1561,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1596,7 +1596,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1631,7 +1631,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1666,7 +1666,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1701,7 +1701,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1736,7 +1736,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1771,7 +1771,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1806,7 +1806,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1841,7 +1841,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1876,7 +1876,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"true\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1911,7 +1911,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1946,7 +1946,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1981,7 +1981,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -2016,7 +2016,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": \"false\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -2205,7 +2205,7 @@ "typeName": "Query", "dataSourceName": "Payment", "kind": "UNIT", - "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"false\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": false, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "responseMappingTemplate": "$util.toJson($ctx.result)" } }, @@ -2240,7 +2240,7 @@ "typeName": "Query", "dataSourceName": "Payment", "kind": "UNIT", - "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": \"true\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": true, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "responseMappingTemplate": "$util.toJson($ctx.result)" } }, From ce16abc9f68afed6391e6779abeb9c6cde85579d Mon Sep 17 00:00:00 2001 From: Pahud Hsieh Date: Thu, 7 Jul 2022 22:35:57 +0000 Subject: [PATCH 06/15] chore: add unit test --- packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts index 657eecd9f9064..8a489a12561b3 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts @@ -80,6 +80,12 @@ describe('DynamoDb Data Source configuration', () => { }); describe('DynamoDB Mapping Templates', () => { + test('read consistency option should render correctly', () => { + const template = appsync.MappingTemplate.dynamoDbScanTable(true); + const rendered = joined(template.renderTemplate()); + expect(rendered).toStrictEqual(`{\"version\":\"2017-02-28\",\"operation\":\"Scan\",\"consistentRead\":true}`); + }); + test('PutItem projecting all', () => { const template = appsync.MappingTemplate.dynamoDbPutItem( appsync.PrimaryKey.partition('id').is('id'), From 905339bd4dca5118a52d66d3bbf8da27fc3c3882 Mon Sep 17 00:00:00 2001 From: halfmoontonight <17865422138@163.com> Date: Fri, 8 Jul 2022 22:59:11 -0400 Subject: [PATCH 07/15] added united tests for read consistency --- .../aws-appsync/test/appsync-dynamodb.test.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts index 8a489a12561b3..1b348e88cd38b 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts @@ -3,6 +3,7 @@ import { Template } from '@aws-cdk/assertions'; import * as db from '@aws-cdk/aws-dynamodb'; import * as cdk from '@aws-cdk/core'; import * as appsync from '../lib'; +import { KeyCondition } from '../lib'; function joined(str: string): string { return str.replace(/\s+/g, ''); @@ -80,10 +81,22 @@ describe('DynamoDb Data Source configuration', () => { }); describe('DynamoDB Mapping Templates', () => { - test('read consistency option should render correctly', () => { + test('read consistency option for dynamoDbScanTable should render correctly', () => { const template = appsync.MappingTemplate.dynamoDbScanTable(true); const rendered = joined(template.renderTemplate()); - expect(rendered).toStrictEqual(`{\"version\":\"2017-02-28\",\"operation\":\"Scan\",\"consistentRead\":true}`); + expect(rendered).toStrictEqual('{\"version\":\"2017-02-28\",\"operation\":\"Scan\",\"consistentRead\":true}'); + }); + //`{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\":true, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}` + test('read consistency option for dynamoDbGetItem should render correctly', () => { + const template = appsync.MappingTemplate.dynamoDbGetItem('id', 'id', true); + const rendered = joined(template.renderTemplate()); + expect(rendered).toStrictEqual('{\"version\":\"2017-02-28\",\"operation\":\"GetItem\",\"consistentRead\":true,\"key\":{\"id\":$util.dynamodb.toDynamoDBJson($ctx.args.id)}}'); + }); + //`{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\":true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}` + test('read consistency option for dynamoDbQuery should render correctly', () => { + const template = appsync.MappingTemplate.dynamoDbQuery(KeyCondition.eq('order', 'order'), 'orderIndex', true); + const rendered = joined(template.renderTemplate()); + expect(rendered).toStrictEqual('{\"version\":\"2017-02-28\",\"operation\":\"Query\",\"consistentRead\":true,\"index\":\"orderIndex\",\"query\":{\"expression\":\"#order=:order\",\"expressionNames\":{\"#order\":\"order\"},\"expressionValues\":{\":order\":$util.dynamodb.toDynamoDBJson($ctx.args.order)}}}'); }); test('PutItem projecting all', () => { From 08fe755520b97a0553c774dfe9b99c990fa2e274 Mon Sep 17 00:00:00 2001 From: halfmoontonight <17865422138@163.com> Date: Fri, 8 Jul 2022 23:39:30 -0400 Subject: [PATCH 08/15] modified united tests for read consistency --- packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts index 1b348e88cd38b..35ddd4e3cbb24 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts @@ -86,13 +86,13 @@ describe('DynamoDB Mapping Templates', () => { const rendered = joined(template.renderTemplate()); expect(rendered).toStrictEqual('{\"version\":\"2017-02-28\",\"operation\":\"Scan\",\"consistentRead\":true}'); }); - //`{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\":true, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}` + test('read consistency option for dynamoDbGetItem should render correctly', () => { const template = appsync.MappingTemplate.dynamoDbGetItem('id', 'id', true); const rendered = joined(template.renderTemplate()); expect(rendered).toStrictEqual('{\"version\":\"2017-02-28\",\"operation\":\"GetItem\",\"consistentRead\":true,\"key\":{\"id\":$util.dynamodb.toDynamoDBJson($ctx.args.id)}}'); }); - //`{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\":true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}` + test('read consistency option for dynamoDbQuery should render correctly', () => { const template = appsync.MappingTemplate.dynamoDbQuery(KeyCondition.eq('order', 'order'), 'orderIndex', true); const rendered = joined(template.renderTemplate()); From ef9a183ff13d911909e022b0d9cf68c17040a15d Mon Sep 17 00:00:00 2001 From: halfmoontonight <17865422138@163.com> Date: Wed, 13 Jul 2022 13:54:50 -0400 Subject: [PATCH 09/15] update markdown for DynamoDB read consistency --- packages/@aws-cdk/aws-appsync/README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index 73befccaf51d1..eff6a1c3a2a42 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -79,11 +79,10 @@ const demoDS = api.addDynamoDbDataSource('demoDataSource', demoTable); // Resolver for the Query "getDemos" that scans the DynamoDb table and returns the entire list. // Resolver Mapping Template Reference: // https://docs.aws.amazon.com/appsync/latest/devguide/resolver-mapping-template-reference-dynamodb.html -//parameter for the dynamoDbScanTable: consistentRead, whether or not to perform a strongly consistent read with DynamoDB. This is optional, and defaults to false. demoDS.createResolver({ typeName: 'Query', fieldName: 'getDemos', - requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(true), + requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(), responseMappingTemplate: appsync.MappingTemplate.dynamoDbResultList(), }); @@ -99,6 +98,15 @@ demoDS.createResolver({ }); ``` +To enable DynamoDB read consistency with the `MappingTemplate`: +```ts +MappingTemplate.dynamoDbScanTable(true); +MappingTemplate.dynamoDbGetItem(keyName,id,true); +MappingTemplate.dynamoDbQuery(condition,indexName,true); +``` + + + ### Aurora Serverless AppSync provides a data source for executing SQL commands against Amazon Aurora From 364ea79281c609ba802577414b189f958ae67b11 Mon Sep 17 00:00:00 2001 From: halfmoontonight <17865422138@163.com> Date: Wed, 13 Jul 2022 14:41:33 -0400 Subject: [PATCH 10/15] updated the readme.md --- packages/@aws-cdk/aws-appsync/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index eff6a1c3a2a42..c151ca659e64c 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -99,6 +99,7 @@ demoDS.createResolver({ ``` To enable DynamoDB read consistency with the `MappingTemplate`: + ```ts MappingTemplate.dynamoDbScanTable(true); MappingTemplate.dynamoDbGetItem(keyName,id,true); From 502ac8d171f8161b1a92d6a35cc1e1ea3db199c0 Mon Sep 17 00:00:00 2001 From: halfmoontonight <17865422138@163.com> Date: Thu, 14 Jul 2022 18:02:49 -0400 Subject: [PATCH 11/15] updated readme.md --- packages/@aws-cdk/aws-appsync/README.md | 11 +- .../aws-cdk-expose-metric-integ.template.json | 40 ++++++ .../test/cdk-integ.out.expose-metric/cdk.out | 1 + .../cdk-integ.out.expose-metric/manifest.json | 40 ++++++ .../cdk-integ.out.expose-metric/tree.json | 119 ++++++++++++++++++ .../aws-cdk-metricfilter-integ.template.json | 28 +++++ .../cdk-integ.out.metricfilter.lit/cdk.out | 1 + .../manifest.json | 34 +++++ .../cdk-integ.out.metricfilter.lit/tree.json | 89 +++++++++++++ ...k-logs-querydefinition-integ.template.json | 24 ++++ .../cdk.out | 1 + .../manifest.json | 34 +++++ .../tree.json | 85 +++++++++++++ 13 files changed, 504 insertions(+), 3 deletions(-) create mode 100644 packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/aws-cdk-expose-metric-integ.template.json create mode 100644 packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/cdk.out create mode 100644 packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/manifest.json create mode 100644 packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/tree.json create mode 100644 packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/aws-cdk-metricfilter-integ.template.json create mode 100644 packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/cdk.out create mode 100644 packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/manifest.json create mode 100644 packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/tree.json create mode 100644 packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/aws-cdk-logs-querydefinition-integ.template.json create mode 100644 packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/cdk.out create mode 100644 packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/manifest.json create mode 100644 packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/tree.json diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index c151ca659e64c..f770d90a2f078 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -101,9 +101,14 @@ demoDS.createResolver({ To enable DynamoDB read consistency with the `MappingTemplate`: ```ts -MappingTemplate.dynamoDbScanTable(true); -MappingTemplate.dynamoDbGetItem(keyName,id,true); -MappingTemplate.dynamoDbQuery(condition,indexName,true); +demoDS.createResolver({ + typeName: 'Query', + fieldName: 'getDemosConsistent', + requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(true), + //requestMappingTemplate: appsync.MappingTemplate.dynamoDbGetItem('id', 'id', true), + //requestMappingTemplate: appsync.MappingTemplate.dynamoDbQuery(KeyCondition.eq('order', 'order'), 'orderIndex', true), + responseMappingTemplate: appsync.MappingTemplate.dynamoDbResultList(), +}); ``` diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/aws-cdk-expose-metric-integ.template.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/aws-cdk-expose-metric-integ.template.json new file mode 100644 index 0000000000000..e7eb9a1d36239 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/aws-cdk-expose-metric-integ.template.json @@ -0,0 +1,40 @@ +{ + "Resources": { + "LogGroupF5B46931": { + "Type": "AWS::Logs::LogGroup", + "Properties": { + "RetentionInDays": 731 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "MetricFilter1B93B6E5": { + "Type": "AWS::Logs::MetricFilter", + "Properties": { + "FilterPattern": "{ $.latency = \"*\" }", + "LogGroupName": { + "Ref": "LogGroupF5B46931" + }, + "MetricTransformations": [ + { + "MetricName": "Latency", + "MetricNamespace": "MyApp", + "MetricValue": "$.latency" + } + ] + } + }, + "alarmfrommetricfilterF546D67D": { + "Type": "AWS::CloudWatch::Alarm", + "Properties": { + "ComparisonOperator": "GreaterThanOrEqualToThreshold", + "EvaluationPeriods": 2, + "MetricName": "Latency", + "Namespace": "MyApp", + "Period": 300, + "Statistic": "Average", + "Threshold": 100 + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/cdk.out b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/cdk.out new file mode 100644 index 0000000000000..588d7b269d34f --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/cdk.out @@ -0,0 +1 @@ +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/manifest.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/manifest.json new file mode 100644 index 0000000000000..cf68fc96288c3 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/manifest.json @@ -0,0 +1,40 @@ +{ + "version": "20.0.0", + "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, + "aws-cdk-expose-metric-integ": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-expose-metric-integ.template.json", + "validateOnSynth": false + }, + "metadata": { + "/aws-cdk-expose-metric-integ/LogGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LogGroupF5B46931" + } + ], + "/aws-cdk-expose-metric-integ/MetricFilter/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MetricFilter1B93B6E5" + } + ], + "/aws-cdk-expose-metric-integ/alarm from metric filter/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "alarmfrommetricfilterF546D67D" + } + ] + }, + "displayName": "aws-cdk-expose-metric-integ" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/tree.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/tree.json new file mode 100644 index 0000000000000..eaedddae74834 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/tree.json @@ -0,0 +1,119 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "aws-cdk-expose-metric-integ": { + "id": "aws-cdk-expose-metric-integ", + "path": "aws-cdk-expose-metric-integ", + "children": { + "LogGroup": { + "id": "LogGroup", + "path": "aws-cdk-expose-metric-integ/LogGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-expose-metric-integ/LogGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup", + "aws:cdk:cloudformation:props": { + "retentionInDays": 731 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.CfnLogGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.LogGroup", + "version": "0.0.0" + } + }, + "MetricFilter": { + "id": "MetricFilter", + "path": "aws-cdk-expose-metric-integ/MetricFilter", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-expose-metric-integ/MetricFilter/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::MetricFilter", + "aws:cdk:cloudformation:props": { + "filterPattern": "{ $.latency = \"*\" }", + "logGroupName": { + "Ref": "LogGroupF5B46931" + }, + "metricTransformations": [ + { + "metricNamespace": "MyApp", + "metricName": "Latency", + "metricValue": "$.latency" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.CfnMetricFilter", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.MetricFilter", + "version": "0.0.0" + } + }, + "alarm from metric filter": { + "id": "alarm from metric filter", + "path": "aws-cdk-expose-metric-integ/alarm from metric filter", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-expose-metric-integ/alarm from metric filter/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", + "aws:cdk:cloudformation:props": { + "comparisonOperator": "GreaterThanOrEqualToThreshold", + "evaluationPeriods": 2, + "metricName": "Latency", + "namespace": "MyApp", + "period": 300, + "statistic": "Average", + "threshold": 100 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudwatch.CfnAlarm", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudwatch.Alarm", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/aws-cdk-metricfilter-integ.template.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/aws-cdk-metricfilter-integ.template.json new file mode 100644 index 0000000000000..0a270d5e39700 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/aws-cdk-metricfilter-integ.template.json @@ -0,0 +1,28 @@ +{ + "Resources": { + "LogGroupF5B46931": { + "Type": "AWS::Logs::LogGroup", + "Properties": { + "RetentionInDays": 731 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "MetricFilter1B93B6E5": { + "Type": "AWS::Logs::MetricFilter", + "Properties": { + "FilterPattern": "{ $.latency = \"*\" }", + "LogGroupName": { + "Ref": "LogGroupF5B46931" + }, + "MetricTransformations": [ + { + "MetricName": "Latency", + "MetricNamespace": "MyApp", + "MetricValue": "$.latency" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/cdk.out b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/cdk.out new file mode 100644 index 0000000000000..588d7b269d34f --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/cdk.out @@ -0,0 +1 @@ +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/manifest.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/manifest.json new file mode 100644 index 0000000000000..db042c1273be6 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/manifest.json @@ -0,0 +1,34 @@ +{ + "version": "20.0.0", + "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, + "aws-cdk-metricfilter-integ": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-metricfilter-integ.template.json", + "validateOnSynth": false + }, + "metadata": { + "/aws-cdk-metricfilter-integ/LogGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LogGroupF5B46931" + } + ], + "/aws-cdk-metricfilter-integ/MetricFilter/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MetricFilter1B93B6E5" + } + ] + }, + "displayName": "aws-cdk-metricfilter-integ" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/tree.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/tree.json new file mode 100644 index 0000000000000..3fcb3aeff15c6 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/tree.json @@ -0,0 +1,89 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "aws-cdk-metricfilter-integ": { + "id": "aws-cdk-metricfilter-integ", + "path": "aws-cdk-metricfilter-integ", + "children": { + "LogGroup": { + "id": "LogGroup", + "path": "aws-cdk-metricfilter-integ/LogGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-metricfilter-integ/LogGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup", + "aws:cdk:cloudformation:props": { + "retentionInDays": 731 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.CfnLogGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.LogGroup", + "version": "0.0.0" + } + }, + "MetricFilter": { + "id": "MetricFilter", + "path": "aws-cdk-metricfilter-integ/MetricFilter", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-metricfilter-integ/MetricFilter/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::MetricFilter", + "aws:cdk:cloudformation:props": { + "filterPattern": "{ $.latency = \"*\" }", + "logGroupName": { + "Ref": "LogGroupF5B46931" + }, + "metricTransformations": [ + { + "metricNamespace": "MyApp", + "metricName": "Latency", + "metricValue": "$.latency" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.CfnMetricFilter", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.MetricFilter", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/aws-cdk-logs-querydefinition-integ.template.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/aws-cdk-logs-querydefinition-integ.template.json new file mode 100644 index 0000000000000..3429e2b6319f6 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/aws-cdk-logs-querydefinition-integ.template.json @@ -0,0 +1,24 @@ +{ + "Resources": { + "LogGroupF5B46931": { + "Type": "AWS::Logs::LogGroup", + "Properties": { + "RetentionInDays": 731 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "QueryDefinition4190BC36": { + "Type": "AWS::Logs::QueryDefinition", + "Properties": { + "Name": "QueryDefinition", + "QueryString": "fields @timestamp, @message | parse @message \"[*] *\" as loggingType, loggingMessage | filter loggingType = \"ERROR\" | sort @timestamp desc | limit 20 | display loggingMessage", + "LogGroupNames": [ + { + "Ref": "LogGroupF5B46931" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/cdk.out b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/cdk.out new file mode 100644 index 0000000000000..588d7b269d34f --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/cdk.out @@ -0,0 +1 @@ +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/manifest.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/manifest.json new file mode 100644 index 0000000000000..f6c4f733a1113 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/manifest.json @@ -0,0 +1,34 @@ +{ + "version": "20.0.0", + "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, + "aws-cdk-logs-querydefinition-integ": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-logs-querydefinition-integ.template.json", + "validateOnSynth": false + }, + "metadata": { + "/aws-cdk-logs-querydefinition-integ/LogGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LogGroupF5B46931" + } + ], + "/aws-cdk-logs-querydefinition-integ/QueryDefinition/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "QueryDefinition4190BC36" + } + ] + }, + "displayName": "aws-cdk-logs-querydefinition-integ" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/tree.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/tree.json new file mode 100644 index 0000000000000..95f99f2d55cd7 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/tree.json @@ -0,0 +1,85 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "aws-cdk-logs-querydefinition-integ": { + "id": "aws-cdk-logs-querydefinition-integ", + "path": "aws-cdk-logs-querydefinition-integ", + "children": { + "LogGroup": { + "id": "LogGroup", + "path": "aws-cdk-logs-querydefinition-integ/LogGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-logs-querydefinition-integ/LogGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup", + "aws:cdk:cloudformation:props": { + "retentionInDays": 731 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.CfnLogGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.LogGroup", + "version": "0.0.0" + } + }, + "QueryDefinition": { + "id": "QueryDefinition", + "path": "aws-cdk-logs-querydefinition-integ/QueryDefinition", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-logs-querydefinition-integ/QueryDefinition/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::QueryDefinition", + "aws:cdk:cloudformation:props": { + "name": "QueryDefinition", + "queryString": "fields @timestamp, @message | parse @message \"[*] *\" as loggingType, loggingMessage | filter loggingType = \"ERROR\" | sort @timestamp desc | limit 20 | display loggingMessage", + "logGroupNames": [ + { + "Ref": "LogGroupF5B46931" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.CfnQueryDefinition", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.QueryDefinition", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file From 46ae6f1536337aaaebe346c1eca66496f2288a3e Mon Sep 17 00:00:00 2001 From: halfmoontonight <17865422138@163.com> Date: Thu, 14 Jul 2022 18:06:52 -0400 Subject: [PATCH 12/15] updated readme.md --- packages/@aws-cdk/aws-appsync/README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index c151ca659e64c..f770d90a2f078 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -101,9 +101,14 @@ demoDS.createResolver({ To enable DynamoDB read consistency with the `MappingTemplate`: ```ts -MappingTemplate.dynamoDbScanTable(true); -MappingTemplate.dynamoDbGetItem(keyName,id,true); -MappingTemplate.dynamoDbQuery(condition,indexName,true); +demoDS.createResolver({ + typeName: 'Query', + fieldName: 'getDemosConsistent', + requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(true), + //requestMappingTemplate: appsync.MappingTemplate.dynamoDbGetItem('id', 'id', true), + //requestMappingTemplate: appsync.MappingTemplate.dynamoDbQuery(KeyCondition.eq('order', 'order'), 'orderIndex', true), + responseMappingTemplate: appsync.MappingTemplate.dynamoDbResultList(), +}); ``` From 8e25f627ba95c81513a5c2b878dc3b5aa04737f1 Mon Sep 17 00:00:00 2001 From: halfmoontonight <17865422138@163.com> Date: Mon, 18 Jul 2022 13:41:17 -0400 Subject: [PATCH 13/15] update readme.md --- packages/@aws-cdk/aws-appsync/README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index f770d90a2f078..02e06d2b1aeab 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -96,11 +96,8 @@ demoDS.createResolver({ ), responseMappingTemplate: appsync.MappingTemplate.dynamoDbResultItem(), }); -``` - -To enable DynamoDB read consistency with the `MappingTemplate`: -```ts +//To enable DynamoDB read consistency with the `MappingTemplate`: demoDS.createResolver({ typeName: 'Query', fieldName: 'getDemosConsistent', From f2fc776326ff6db7f441a0cb0b1d6cae0aaaee96 Mon Sep 17 00:00:00 2001 From: halfmoontonight <17865422138@163.com> Date: Mon, 18 Jul 2022 22:15:30 -0400 Subject: [PATCH 14/15] updated the expiration timestamp for api-key --- .../aws-appsync-integ.assets.json | 4 +-- .../aws-appsync-integ.template.json | 2 +- .../test/auth-apikey.integ.snapshot/tree.json | 28 +++++++++---------- .../aws-appsync/test/integ.auth-apikey.ts | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json index cffe0a1d20ab0..9006d39823f93 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json @@ -1,7 +1,7 @@ { "version": "20.0.0", "files": { - "bfd02a80e0acec2e7605e7bb0ba6d05fb7cb99c262302124de493ee710fa7e88": { + "7eaa4499d04a6696121796bb6e27fab5b4211517a6e0523260984e33c134f84f": { "source": { "path": "aws-appsync-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "bfd02a80e0acec2e7605e7bb0ba6d05fb7cb99c262302124de493ee710fa7e88.json", + "objectKey": "7eaa4499d04a6696121796bb6e27fab5b4211517a6e0523260984e33c134f84f.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json index dc500b5f367f9..bed0ebb934e58 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json @@ -28,7 +28,7 @@ "ApiId" ] }, - "Expires": 1658053715 + "Expires": 1689711694 }, "DependsOn": [ "ApiSchema510EECD7" diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json index 4715745d24847..a1234c365c244 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json @@ -31,7 +31,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnGraphQLApi", + "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } }, @@ -51,7 +51,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnGraphQLSchema", + "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } }, @@ -67,11 +67,11 @@ "ApiId" ] }, - "expires": 1658053715 + "expires": 1689711694 } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnApiKey", + "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } }, @@ -207,7 +207,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnDataSource", + "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } }, @@ -236,14 +236,14 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.33" } }, "MutationaddTestResolver": { @@ -271,25 +271,25 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.33" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.DynamoDbDataSource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.33" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.GraphqlApi", + "fqn": "@aws-cdk/core.Resource", "version": "0.0.0" } }, diff --git a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts index f2e8cb4145732..3f842c886e0bc 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts @@ -29,7 +29,7 @@ const api = new GraphqlApi(stack, 'Api', { authorizationType: AuthorizationType.API_KEY, apiKeyConfig: { // Generate a timestamp that's 365 days ahead, use atTimestamp so integ test doesn't fail - expires: Expiration.atTimestamp(1658053715000), + expires: Expiration.atTimestamp(1689711694000), }, }, }, From 5ebe3b20bd1b06a0002a7516dabc4a448f08e511 Mon Sep 17 00:00:00 2001 From: Yichen Qian <17865422138@163.com> Date: Thu, 21 Jul 2022 15:57:36 -0400 Subject: [PATCH 15/15] Update packages/@aws-cdk/aws-appsync/README.md Co-authored-by: Pahud Hsieh --- packages/@aws-cdk/aws-appsync/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index 02e06d2b1aeab..e562a0b267342 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -102,8 +102,6 @@ demoDS.createResolver({ typeName: 'Query', fieldName: 'getDemosConsistent', requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(true), - //requestMappingTemplate: appsync.MappingTemplate.dynamoDbGetItem('id', 'id', true), - //requestMappingTemplate: appsync.MappingTemplate.dynamoDbQuery(KeyCondition.eq('order', 'order'), 'orderIndex', true), responseMappingTemplate: appsync.MappingTemplate.dynamoDbResultList(), }); ```