From da3d9bff23055ddfe99af343d8c81bca43626351 Mon Sep 17 00:00:00 2001 From: Mitchell Valine Date: Mon, 12 Dec 2022 16:08:07 -0800 Subject: [PATCH 1/2] fix(appsync): unstable IDs on resolvers and functions Fixes an issue that would cause unexpected resource replacement for appsync resolvers and functions because of construct nesting and ID generation. Changes `createResolver` and `createFunction` methods on `GraphQlApi` and `DataSource` constructs to require explicitly passing an ID. Additionally changes the scope of the constructs created in `createResolver` and `createFunction` on the `DataSource` construct to be `this.api` instead of `this`. This allows users to change the data sources of resolvers and functions while keeping the IDs stable and avoiding resource replacement. This helps to avoid the `only one resolver per field` error that occurs when deleting a resolver on a field, and adding a new one within the same deployment. BREAKING CHANGE: `DataSource.createResolver`, `DataSource.createFunction`, and `GraphQlApi.createResolver` now require 2 arguments instead of 1. Fixes: #13269 --- .../@aws-cdk/aws-appsync/lib/data-source.ts | 8 +- .../aws-appsync/lib/graphqlapi-base.ts | 6 +- .../test/appsync-caching-config.test.ts | 10 +- .../aws-appsync/test/appsync-lambda.test.ts | 4 +- .../test/appsync-mapping-template.test.ts | 6 +- .../@aws-cdk/aws-appsync/test/appsync.test.ts | 21 +- .../aws-appsync/test/integ.api-import.ts | 8 +- .../aws-appsync/test/integ.appsync-lambda.ts | 12 +- .../aws-appsync-integ.assets.json | 6 +- .../aws-appsync-integ.template.json | 4 +- .../integ.auth-apikey.js.snapshot/cdk.out | 2 +- .../integ.auth-apikey.js.snapshot/integ.json | 2 +- .../manifest.json | 30 +- .../integ.auth-apikey.js.snapshot/tree.json | 120 +- .../aws-appsync/test/integ.auth-apikey.ts | 4 +- .../appsync-elasticsearch.assets.json | 6 +- .../appsync-elasticsearch.template.json | 2 +- .../cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 17 +- .../tree.json | 62 +- .../test/integ.graphql-elasticsearch.ts | 4 +- .../aws-appsync-integ.assets.json | 6 +- .../aws-appsync-integ.template.json | 6 +- .../integ.graphql-iam.js.snapshot/cdk.out | 2 +- .../integ.graphql-iam.js.snapshot/integ.json | 2 +- .../manifest.json | 43 +- .../integ.graphql-iam.js.snapshot/tree.json | 178 +- .../aws-appsync/test/integ.graphql-iam.ts | 6 +- .../appsync-opensearch.assets.json | 6 +- .../appsync-opensearch.template.json | 2 +- .../cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 17 +- .../tree.json | 62 +- .../test/integ.graphql-opensearch.ts | 2 +- .../aws-appsync-integ.assets.json | 6 +- .../aws-appsync-integ.template.json | 496 +-- .../test/integ.graphql.js.snapshot/cdk.out | 2 +- .../test/integ.graphql.js.snapshot/integ.json | 2 +- .../integ.graphql.js.snapshot/manifest.json | 665 +++- .../test/integ.graphql.js.snapshot/tree.json | 3232 ++++++++--------- .../aws-appsync/test/integ.graphql.ts | 50 +- 43 files changed, 2816 insertions(+), 2311 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/lib/data-source.ts b/packages/@aws-cdk/aws-appsync/lib/data-source.ts index 05268cb469bbc..8a1cb6390a505 100644 --- a/packages/@aws-cdk/aws-appsync/lib/data-source.ts +++ b/packages/@aws-cdk/aws-appsync/lib/data-source.ts @@ -132,8 +132,8 @@ export abstract class BaseDataSource extends Construct { /** * creates a new resolver for this datasource and API using the given properties */ - public createResolver(props: BaseResolverProps): Resolver { - return new Resolver(this, `${props.typeName}${props.fieldName}Resolver`, { + public createResolver(id: string, props: BaseResolverProps): Resolver { + return new Resolver(this.api, id, { api: this.api, dataSource: this, ...props, @@ -143,8 +143,8 @@ export abstract class BaseDataSource extends Construct { /** * creates a new appsync function for this datasource and API using the given properties */ - public createFunction(props: BaseAppsyncFunctionProps): AppsyncFunction { - return new AppsyncFunction(this, `${props.name}Function`, { + public createFunction(id: string, props: BaseAppsyncFunctionProps): AppsyncFunction { + return new AppsyncFunction(this.api, id, { api: this.api, dataSource: this, ...props, diff --git a/packages/@aws-cdk/aws-appsync/lib/graphqlapi-base.ts b/packages/@aws-cdk/aws-appsync/lib/graphqlapi-base.ts index 0737be10c8fc3..4823837757883 100644 --- a/packages/@aws-cdk/aws-appsync/lib/graphqlapi-base.ts +++ b/packages/@aws-cdk/aws-appsync/lib/graphqlapi-base.ts @@ -134,7 +134,7 @@ export interface IGraphqlApi extends IResource { /** * creates a new resolver for this datasource and API using the given properties */ - createResolver(props: ExtendedResolverProps): Resolver; + createResolver(id: string, props: ExtendedResolverProps): Resolver; /** * Add schema dependency if not imported @@ -285,8 +285,8 @@ export abstract class GraphqlApiBase extends Resource implements IGraphqlApi { /** * creates a new resolver for this datasource and API using the given properties */ - public createResolver(props: ExtendedResolverProps): Resolver { - return new Resolver(this, `${props.typeName}${props.fieldName}Resolver`, { + public createResolver(id: string, props: ExtendedResolverProps): Resolver { + return new Resolver(this, id, { api: this, ...props, }); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-caching-config.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-caching-config.test.ts index 3537c9c91a3ce..43dc85a9b1fd5 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-caching-config.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-caching-config.test.ts @@ -33,7 +33,7 @@ describe('Lambda caching config', () => { // WHEN const lambdaDS = api.addLambdaDataSource('LambdaDS', func); - lambdaDS.createResolver({ + lambdaDS.createResolver('QueryAllPosts', { typeName: 'Query', fieldName: 'allPosts', }); @@ -50,7 +50,7 @@ describe('Lambda caching config', () => { // WHEN const lambdaDS = api.addLambdaDataSource('LambdaDS', func); - lambdaDS.createResolver({ + lambdaDS.createResolver('QueryAllPosts', { typeName: 'Query', fieldName: 'allPosts', cachingConfig: { @@ -77,7 +77,7 @@ describe('Lambda caching config', () => { // THEN expect(() => { - lambdaDS.createResolver({ + lambdaDS.createResolver('QueryAllPosts', { typeName: 'Query', fieldName: 'allPosts', cachingConfig: { @@ -95,7 +95,7 @@ describe('Lambda caching config', () => { // THEN expect(() => { - lambdaDS.createResolver({ + lambdaDS.createResolver('QueryAllPosts', { typeName: 'Query', fieldName: 'allPosts', cachingConfig: { @@ -113,7 +113,7 @@ describe('Lambda caching config', () => { // THEN expect(() => { - lambdaDS.createResolver({ + lambdaDS.createResolver('QueryAllPosts', { typeName: 'Query', fieldName: 'allPosts', cachingConfig: { diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-lambda.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-lambda.test.ts index 702c85ab928a4..9479d5975adc5 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-lambda.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-lambda.test.ts @@ -116,7 +116,7 @@ describe('Lambda Data Source configuration', () => { description: 'custom description', }); - ds.createResolver({ + ds.createResolver('TestField', { typeName: 'test', fieldName: 'field', }); @@ -164,4 +164,4 @@ describe('adding lambda data source from imported api', () => { ApiId: { 'Fn::GetAtt': ['baseApiCDA4D43A', 'ApiId'] }, }); }); -}); \ No newline at end of file +}); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-mapping-template.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-mapping-template.test.ts index 67ab1b05fd54c..e06e87e6658a5 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-mapping-template.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-mapping-template.test.ts @@ -34,7 +34,7 @@ describe('Lambda Mapping Templates', () => { // WHEN const lambdaDS = api.addLambdaDataSource('LambdaDS', func); - lambdaDS.createResolver({ + lambdaDS.createResolver('QueryAllPosts', { typeName: 'Query', fieldName: 'allPosts', requestMappingTemplate: appsync.MappingTemplate.lambdaRequest(), @@ -52,7 +52,7 @@ describe('Lambda Mapping Templates', () => { // WHEN const lambdaDS = api.addLambdaDataSource('LambdaDS', func); - lambdaDS.createResolver({ + lambdaDS.createResolver('PostRelatedPosts', { typeName: 'Post', fieldName: 'relatedPosts', requestMappingTemplate: appsync.MappingTemplate.lambdaRequest('$util.toJson($ctx)', 'BatchInvoke'), @@ -67,4 +67,4 @@ describe('Lambda Mapping Templates', () => { MaxBatchSize: 10, }); }); -}); \ No newline at end of file +}); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync.test.ts index bb64702c47b94..840f9664e5854 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync.test.ts @@ -21,13 +21,13 @@ beforeEach(() => { test('appsync should configure pipeline when pipelineConfig has contents', () => { // WHEN const ds = api.addNoneDataSource('none'); - const test1 = ds.createFunction({ + const test1 = ds.createFunction('Test1Function', { name: 'test1', }); - const test2 = ds.createFunction({ + const test2 = ds.createFunction('Test2Function', { name: 'test2', }); - api.createResolver({ + api.createResolver('TestTest2', { typeName: 'test', fieldName: 'test2', pipelineConfig: [test1, test2], @@ -38,8 +38,8 @@ test('appsync should configure pipeline when pipelineConfig has contents', () => Kind: 'PIPELINE', PipelineConfig: { Functions: [ - { 'Fn::GetAtt': ['apinonetest1FunctionEF63046F', 'FunctionId'] }, - { 'Fn::GetAtt': ['apinonetest2Function615111D0', 'FunctionId'] }, + { 'Fn::GetAtt': ['apiTest1Function793605E9', 'FunctionId'] }, + { 'Fn::GetAtt': ['apiTest2FunctionB704A7AD', 'FunctionId'] }, ], }, }); @@ -48,16 +48,17 @@ test('appsync should configure pipeline when pipelineConfig has contents', () => test('appsync should error when creating pipeline resolver with data source', () => { // WHEN const ds = api.addNoneDataSource('none'); - const test1 = ds.createFunction({ + const test1 = ds.createFunction('Test1Function', { name: 'test1', }); - const test2 = ds.createFunction({ + const test2 = ds.createFunction('Test2Function', { name: 'test2', }); // THEN expect(() => { - ds.createResolver({ + api.createResolver('TestTest2', { + dataSource: ds, typeName: 'test', fieldName: 'test2', pipelineConfig: [test1, test2], @@ -83,7 +84,7 @@ test('appsync should configure resolver as unit when pipelineConfig is empty', ( test('appsync should configure resolver as unit when pipelineConfig is empty array', () => { // WHEN - api.createResolver({ + api.createResolver('TestTest2', { typeName: 'test', fieldName: 'test2', pipelineConfig: [], @@ -237,4 +238,4 @@ test('log retention should not appear when no retention time is specified', () = // THEN Template.fromStack(stack).resourceCountIs('Custom::LogRetention', 0); -}); \ No newline at end of file +}); 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 1ccf3228a5dbd..451c4357c81aa 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts @@ -43,14 +43,14 @@ const testTable = new db.Table(stack, 'TestTable', { const testDS = api.addDynamoDbDataSource('ds', testTable); -testDS.createResolver({ +testDS.createResolver('QueryGetTests', { typeName: 'Query', fieldName: 'getTests', requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(), responseMappingTemplate: appsync.MappingTemplate.dynamoDbResultList(), }); -testDS.createResolver({ +testDS.createResolver('MutationAddTest', { typeName: 'Mutation', fieldName: 'addTest', requestMappingTemplate: appsync.MappingTemplate.dynamoDbPutItem(appsync.PrimaryKey.partition('id').auto(), appsync.Values.projecting('test')), @@ -64,7 +64,7 @@ const api2 = appsync.GraphqlApi.fromGraphqlApiAttributes(stack, 'api2', { const none = api2.addNoneDataSource('none'); -const func = none.createFunction({ +const func = none.createFunction('PipelineFunction', { name: 'pipeline_function', requestMappingTemplate: appsync.MappingTemplate.fromString(JSON.stringify({ version: '2017-02-28', @@ -87,4 +87,4 @@ new appsync.Resolver(stack, 'pipeline_resolver', { })), }); -app.synth(); \ No newline at end of file +app.synth(); diff --git a/packages/@aws-cdk/aws-appsync/test/integ.appsync-lambda.ts b/packages/@aws-cdk/aws-appsync/test/integ.appsync-lambda.ts index 3a4ec57b07898..365d8b328135a 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.appsync-lambda.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.appsync-lambda.ts @@ -47,35 +47,35 @@ const requestPayload = (field: string, { withArgs = false, withSource = false }) }; const responseMappingTemplate = appsync.MappingTemplate.lambdaResult(); -lambdaDS.createResolver({ +lambdaDS.createResolver('QueryGetPost', { typeName: 'Query', fieldName: 'getPost', requestMappingTemplate: appsync.MappingTemplate.lambdaRequest(requestPayload('getPost', { withArgs: true })), responseMappingTemplate, }); -lambdaDS.createResolver({ +lambdaDS.createResolver('QueryAllPosts', { typeName: 'Query', fieldName: 'allPosts', requestMappingTemplate: appsync.MappingTemplate.lambdaRequest(requestPayload('allPosts', {})), responseMappingTemplate, }); -lambdaDS.createResolver({ +lambdaDS.createResolver('MutationAddPost', { typeName: 'Mutation', fieldName: 'addPost', requestMappingTemplate: appsync.MappingTemplate.lambdaRequest(requestPayload('addPost', { withArgs: true })), responseMappingTemplate, }); -lambdaDS.createResolver({ +lambdaDS.createResolver('PostRelatedPosts', { typeName: 'Post', fieldName: 'relatedPosts', requestMappingTemplate: appsync.MappingTemplate.lambdaRequest(requestPayload('relatedPosts', { withSource: true }), 'BatchInvoke'), responseMappingTemplate, }); -lambdaDS.createResolver({ +lambdaDS.createResolver('PostRelatedPostsMaxBatchSize', { typeName: 'Post', fieldName: 'relatedPostsMaxBatchSize', requestMappingTemplate: appsync.MappingTemplate.lambdaRequest(requestPayload('relatedPostsMaxBatchSize', { withSource: true }), 'BatchInvoke'), @@ -83,4 +83,4 @@ lambdaDS.createResolver({ maxBatchSize: 2, }); -app.synth(); \ No newline at end of file +app.synth(); diff --git a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/aws-appsync-integ.assets.json b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/aws-appsync-integ.assets.json index e1fc66d0072de..1dce01edaab20 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/aws-appsync-integ.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/aws-appsync-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "22.0.0", "files": { - "b0462850439179659920597f4327262b24073af4f4969622163b0a295fce1dda": { + "de7d932209c6d07c0ba0e631387676246a8182018b2b7423dc18b52baec3e984": { "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": "b0462850439179659920597f4327262b24073af4f4969622163b0a295fce1dda.json", + "objectKey": "de7d932209c6d07c0ba0e631387676246a8182018b2b7423dc18b52baec3e984.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/integ.auth-apikey.js.snapshot/aws-appsync-integ.template.json b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/aws-appsync-integ.template.json index 08669bf3f0155..a3fec85414f21 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/aws-appsync-integ.template.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/aws-appsync-integ.template.json @@ -121,7 +121,7 @@ } } }, - "ApitestDataSourceQuerygetTestsResolverA3BBB672": { + "ApiQueryGetTestsF8C40170": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -142,7 +142,7 @@ "ApitestDataSource96AE54D5" ] }, - "ApitestDataSourceMutationaddTestResolver36203D6B": { + "ApiMutationAddTestBF148084": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { diff --git a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/cdk.out b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/cdk.out index 8ecc185e9dbee..145739f539580 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/integ.json b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/integ.json index 7dcc8937ebb9f..aa96b0d39f29c 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "testCases": { "integ.auth-apikey": { "stacks": [ diff --git a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/manifest.json b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/manifest.json index 5092943d4ea3f..84425007dd38d 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "artifacts": { "aws-appsync-integ.assets": { "type": "cdk:asset-manifest", @@ -17,7 +17,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b0462850439179659920597f4327262b24073af4f4969622163b0a295fce1dda.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/de7d932209c6d07c0ba0e631387676246a8182018b2b7423dc18b52baec3e984.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -69,16 +69,16 @@ "data": "ApitestDataSource96AE54D5" } ], - "/aws-appsync-integ/Api/testDataSource/QuerygetTestsResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetTests/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApitestDataSourceQuerygetTestsResolverA3BBB672" + "data": "ApiQueryGetTestsF8C40170" } ], - "/aws-appsync-integ/Api/testDataSource/MutationaddTestResolver/Resource": [ + "/aws-appsync-integ/Api/MutationAddTest/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApitestDataSourceMutationaddTestResolver36203D6B" + "data": "ApiMutationAddTestBF148084" } ], "/aws-appsync-integ/TestTable/Resource": [ @@ -98,6 +98,24 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "ApitestDataSourceQuerygetTestsResolverA3BBB672": [ + { + "type": "aws:cdk:logicalId", + "data": "ApitestDataSourceQuerygetTestsResolverA3BBB672", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApitestDataSourceMutationaddTestResolver36203D6B": [ + { + "type": "aws:cdk:logicalId", + "data": "ApitestDataSourceMutationaddTestResolver36203D6B", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-appsync-integ" diff --git a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/tree.json index 6c8c0f98bc587..4d17f656f3f8c 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.js.snapshot/tree.json @@ -217,80 +217,80 @@ "fqn": "@aws-cdk/aws-appsync.CfnDataSource", "version": "0.0.0" } - }, - "QuerygetTestsResolver": { - "id": "QuerygetTestsResolver", - "path": "aws-appsync-integ/Api/testDataSource/QuerygetTestsResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/testDataSource/QuerygetTestsResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "getTests", - "typeName": "Query", - "dataSourceName": "testDataSource", - "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", - "responseMappingTemplate": "$util.toJson($ctx.result.items)" - } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.DynamoDbDataSource", + "version": "0.0.0" + } + }, + "QueryGetTests": { + "id": "QueryGetTests", + "path": "aws-appsync-integ/Api/QueryGetTests", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetTests/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "getTests", + "typeName": "Query", + "dataSourceName": "testDataSource", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } - }, - "MutationaddTestResolver": { - "id": "MutationaddTestResolver", - "path": "aws-appsync-integ/Api/testDataSource/MutationaddTestResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/testDataSource/MutationaddTestResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "addTest", - "typeName": "Mutation", - "dataSourceName": "testDataSource", - "kind": "UNIT", - "requestMappingTemplate": "\n #set($input = $ctx.args.test)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", - "responseMappingTemplate": "$util.toJson($ctx.result)" - } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "MutationAddTest": { + "id": "MutationAddTest", + "path": "aws-appsync-integ/Api/MutationAddTest", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/MutationAddTest/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "addTest", + "typeName": "Mutation", + "dataSourceName": "testDataSource", + "kind": "UNIT", + "requestMappingTemplate": "\n #set($input = $ctx.args.test)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", + "responseMappingTemplate": "$util.toJson($ctx.result)" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.DynamoDbDataSource", + "fqn": "@aws-cdk/aws-appsync.Resolver", "version": "0.0.0" } } @@ -371,7 +371,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.182" } } }, 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 39462d91e327f..234f3595aa112 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts @@ -46,14 +46,14 @@ const testTable = new Table(stack, 'TestTable', { const testDS = api.addDynamoDbDataSource('testDataSource', testTable); -testDS.createResolver({ +testDS.createResolver('QueryGetTests', { typeName: 'Query', fieldName: 'getTests', requestMappingTemplate: MappingTemplate.dynamoDbScanTable(), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); -testDS.createResolver({ +testDS.createResolver('MutationAddTest', { typeName: 'Mutation', fieldName: 'addTest', requestMappingTemplate: MappingTemplate.dynamoDbPutItem(PrimaryKey.partition('id').auto(), Values.projecting('test')), diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/appsync-elasticsearch.assets.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/appsync-elasticsearch.assets.json index 6396fedfa0262..14576bb0b5a50 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/appsync-elasticsearch.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/appsync-elasticsearch.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "22.0.0", "files": { - "08fe8252ae99e2f46d03e04321cb848d70ee9c2656baeb387f3baae1575b1d87": { + "fcad6b907b2ee72d05b9e3af0a8d220115fb800f1839d979919a8e80e5c933e5": { "source": { "path": "appsync-elasticsearch.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "08fe8252ae99e2f46d03e04321cb848d70ee9c2656baeb387f3baae1575b1d87.json", + "objectKey": "fcad6b907b2ee72d05b9e3af0a8d220115fb800f1839d979919a8e80e5c933e5.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/integ.graphql-elasticsearch.js.snapshot/appsync-elasticsearch.template.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/appsync-elasticsearch.template.json index 028edef274be0..25aea7ee34590 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/appsync-elasticsearch.template.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/appsync-elasticsearch.template.json @@ -185,7 +185,7 @@ } } }, - "apidsQuerygetTestsResolver5C6FBB59": { + "apiQueryGetTests5F79F353": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/cdk.out b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/cdk.out index 8ecc185e9dbee..145739f539580 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/integ.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/integ.json index 357bb3676e3d2..bbb089bc1d1e4 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "testCases": { "integ.graphql-elasticsearch": { "stacks": [ diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/manifest.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/manifest.json index 71d3fb6055567..ec86cc75c0088 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "artifacts": { "appsync-elasticsearch.assets": { "type": "cdk:asset-manifest", @@ -17,7 +17,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/08fe8252ae99e2f46d03e04321cb848d70ee9c2656baeb387f3baae1575b1d87.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fcad6b907b2ee72d05b9e3af0a8d220115fb800f1839d979919a8e80e5c933e5.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -81,10 +81,10 @@ "data": "apids4328272F" } ], - "/appsync-elasticsearch/api/ds/QuerygetTestsResolver/Resource": [ + "/appsync-elasticsearch/api/QueryGetTests/Resource": [ { "type": "aws:cdk:logicalId", - "data": "apidsQuerygetTestsResolver5C6FBB59" + "data": "apiQueryGetTests5F79F353" } ], "/appsync-elasticsearch/BootstrapVersion": [ @@ -98,6 +98,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "apidsQuerygetTestsResolver5C6FBB59": [ + { + "type": "aws:cdk:logicalId", + "data": "apidsQuerygetTestsResolver5C6FBB59", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "appsync-elasticsearch" diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/tree.json index 90f8169797964..9f3215651373d 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.js.snapshot/tree.json @@ -316,45 +316,45 @@ "fqn": "@aws-cdk/aws-appsync.CfnDataSource", "version": "0.0.0" } - }, - "QuerygetTestsResolver": { - "id": "QuerygetTestsResolver", - "path": "appsync-elasticsearch/api/ds/QuerygetTestsResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "appsync-elasticsearch/api/ds/QuerygetTestsResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "apiC8550315", - "ApiId" - ] - }, - "fieldName": "getTests", - "typeName": "Query", - "dataSourceName": "ds", - "kind": "UNIT", - "requestMappingTemplate": "{\"version\":\"2017-02-28\",\"operation\":\"GET\",\"path\":\"/id/post/_search\",\"params\":{\"headers\":{},\"queryString\":{},\"body\":{\"from\":0,\"size\":50}}}", - "responseMappingTemplate": "{\"version\":\"2017-02-28\",\"operation\":\"GET\",\"path\":\"/id/post/_search\",\"params\":{\"headers\":{},\"queryString\":{},\"body\":{\"from\":0,\"size\":50,\"query\":{\"term\":{\"author\":\"$util.toJson($context.arguments.author)\"}}}}}" - } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.ElasticsearchDataSource", + "version": "0.0.0" + } + }, + "QueryGetTests": { + "id": "QueryGetTests", + "path": "appsync-elasticsearch/api/QueryGetTests", + "children": { + "Resource": { + "id": "Resource", + "path": "appsync-elasticsearch/api/QueryGetTests/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "apiC8550315", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "getTests", + "typeName": "Query", + "dataSourceName": "ds", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\":\"2017-02-28\",\"operation\":\"GET\",\"path\":\"/id/post/_search\",\"params\":{\"headers\":{},\"queryString\":{},\"body\":{\"from\":0,\"size\":50}}}", + "responseMappingTemplate": "{\"version\":\"2017-02-28\",\"operation\":\"GET\",\"path\":\"/id/post/_search\",\"params\":{\"headers\":{},\"queryString\":{},\"body\":{\"from\":0,\"size\":50,\"query\":{\"term\":{\"author\":\"$util.toJson($context.arguments.author)\"}}}}}" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.ElasticsearchDataSource", + "fqn": "@aws-cdk/aws-appsync.Resolver", "version": "0.0.0" } } @@ -391,7 +391,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.182" } } }, diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.ts b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.ts index 199dcb6454aeb..e8b25d9f47538 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-elasticsearch.ts @@ -27,7 +27,7 @@ const api = new appsync.GraphqlApi(stack, 'api', { const ds = api.addElasticsearchDataSource('ds', domain); -ds.createResolver({ +ds.createResolver('QueryGetTests', { typeName: 'Query', fieldName: 'getTests', requestMappingTemplate: appsync.MappingTemplate.fromString(JSON.stringify({ @@ -63,4 +63,4 @@ ds.createResolver({ })), }); -app.synth(); \ No newline at end of file +app.synth(); diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/aws-appsync-integ.assets.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/aws-appsync-integ.assets.json index e0414901b9572..e865af1460b98 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/aws-appsync-integ.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/aws-appsync-integ.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "files": { "f38244b9028d22d4e265a5b466bdba928d93b5a4ac2b4bbf583309b3f027f044": { "source": { @@ -14,7 +14,7 @@ } } }, - "8d15941ec2e2ee7e1551ec111288fbf5f90d3c8054ccd83a9d3f4995d2475536": { + "828c009f2f1e2d21ce3627f5921a761c1c9b77228bbd5d9723b9a0a92952b49f": { "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": "8d15941ec2e2ee7e1551ec111288fbf5f90d3c8054ccd83a9d3f4995d2475536.json", + "objectKey": "828c009f2f1e2d21ce3627f5921a761c1c9b77228bbd5d9723b9a0a92952b49f.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/integ.graphql-iam.js.snapshot/aws-appsync-integ.template.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/aws-appsync-integ.template.json index 1a4e761944b90..2e72be8c91099 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/aws-appsync-integ.template.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/aws-appsync-integ.template.json @@ -153,7 +153,7 @@ } } }, - "ApidsQuerygetTestResolverCCED7EC2": { + "ApiQueryGetTest0BEAD0F2": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -174,7 +174,7 @@ "ApiSchema510EECD7" ] }, - "ApidsQuerygetTestsResolver952F49EE": { + "ApiQueryGetTestsF8C40170": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -195,7 +195,7 @@ "ApiSchema510EECD7" ] }, - "ApidsMutationaddTestResolverBCF0400B": { + "ApiMutationAddTestBF148084": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/cdk.out b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/cdk.out index 8ecc185e9dbee..145739f539580 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/integ.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/integ.json index 7c2a2229a0b5e..a62bab1947a9f 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "testCases": { "integ.graphql-iam": { "stacks": [ diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/manifest.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/manifest.json index 8b33b79f39dd0..86f747e9a6c80 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "artifacts": { "aws-appsync-integ.assets": { "type": "cdk:asset-manifest", @@ -17,7 +17,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8d15941ec2e2ee7e1551ec111288fbf5f90d3c8054ccd83a9d3f4995d2475536.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/828c009f2f1e2d21ce3627f5921a761c1c9b77228bbd5d9723b9a0a92952b49f.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -69,22 +69,22 @@ "data": "Apids0DB53FEA" } ], - "/aws-appsync-integ/Api/ds/QuerygetTestResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetTest/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApidsQuerygetTestResolverCCED7EC2" + "data": "ApiQueryGetTest0BEAD0F2" } ], - "/aws-appsync-integ/Api/ds/QuerygetTestsResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetTests/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApidsQuerygetTestsResolver952F49EE" + "data": "ApiQueryGetTestsF8C40170" } ], - "/aws-appsync-integ/Api/ds/MutationaddTestResolver/Resource": [ + "/aws-appsync-integ/Api/MutationAddTest/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApidsMutationaddTestResolverBCF0400B" + "data": "ApiMutationAddTestBF148084" } ], "/aws-appsync-integ/TestTable/Resource": [ @@ -134,6 +134,33 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "ApidsQuerygetTestResolverCCED7EC2": [ + { + "type": "aws:cdk:logicalId", + "data": "ApidsQuerygetTestResolverCCED7EC2", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApidsQuerygetTestsResolver952F49EE": [ + { + "type": "aws:cdk:logicalId", + "data": "ApidsQuerygetTestsResolver952F49EE", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApidsMutationaddTestResolverBCF0400B": [ + { + "type": "aws:cdk:logicalId", + "data": "ApidsMutationaddTestResolverBCF0400B", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-appsync-integ" diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/tree.json index e349d8989099b..1d4edb1992fa7 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.js.snapshot/tree.json @@ -260,115 +260,115 @@ "fqn": "@aws-cdk/aws-appsync.CfnDataSource", "version": "0.0.0" } - }, - "QuerygetTestResolver": { - "id": "QuerygetTestResolver", - "path": "aws-appsync-integ/Api/ds/QuerygetTestResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/ds/QuerygetTestResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "getTest", - "typeName": "Query", - "dataSourceName": "testDataSource", - "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.DynamoDbDataSource", + "version": "0.0.0" + } + }, + "QueryGetTest": { + "id": "QueryGetTest", + "path": "aws-appsync-integ/Api/QueryGetTest", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetTest/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "getTest", + "typeName": "Query", + "dataSourceName": "testDataSource", + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } - }, - "QuerygetTestsResolver": { - "id": "QuerygetTestsResolver", - "path": "aws-appsync-integ/Api/ds/QuerygetTestsResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/ds/QuerygetTestsResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "getTests", - "typeName": "Query", - "dataSourceName": "testDataSource", - "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", - "responseMappingTemplate": "$util.toJson($ctx.result.items)" - } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QueryGetTests": { + "id": "QueryGetTests", + "path": "aws-appsync-integ/Api/QueryGetTests", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetTests/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "getTests", + "typeName": "Query", + "dataSourceName": "testDataSource", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } - }, - "MutationaddTestResolver": { - "id": "MutationaddTestResolver", - "path": "aws-appsync-integ/Api/ds/MutationaddTestResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/ds/MutationaddTestResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "addTest", - "typeName": "Mutation", - "dataSourceName": "testDataSource", - "kind": "UNIT", - "requestMappingTemplate": "\n #set($input = $ctx.args.test)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", - "responseMappingTemplate": "$util.toJson($ctx.result)" - } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "MutationAddTest": { + "id": "MutationAddTest", + "path": "aws-appsync-integ/Api/MutationAddTest", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/MutationAddTest/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "addTest", + "typeName": "Mutation", + "dataSourceName": "testDataSource", + "kind": "UNIT", + "requestMappingTemplate": "\n #set($input = $ctx.args.test)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", + "responseMappingTemplate": "$util.toJson($ctx.result)" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.DynamoDbDataSource", + "fqn": "@aws-cdk/aws-appsync.Resolver", "version": "0.0.0" } } @@ -820,7 +820,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.182" } } }, 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 9d2105e923c18..b92a78485c3c2 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.ts @@ -66,21 +66,21 @@ const testTable = new Table(stack, 'TestTable', { const testDS = api.addDynamoDbDataSource('ds', testTable, { name: 'testDataSource' }); -testDS.createResolver({ +testDS.createResolver('QueryGetTest', { typeName: 'Query', fieldName: 'getTest', requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id'), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); -testDS.createResolver({ +testDS.createResolver('QueryGetTests', { typeName: 'Query', fieldName: 'getTests', requestMappingTemplate: MappingTemplate.dynamoDbScanTable(), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); -testDS.createResolver({ +testDS.createResolver('MutationAddTest', { typeName: 'Mutation', fieldName: 'addTest', requestMappingTemplate: MappingTemplate.dynamoDbPutItem(PrimaryKey.partition('id').auto(), Values.projecting('test')), diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/appsync-opensearch.assets.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/appsync-opensearch.assets.json index 1a4098ed90364..a7da3cc32abc0 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/appsync-opensearch.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/appsync-opensearch.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "22.0.0", "files": { - "afad76ea31dfbff09b61eded5f1d5e5fd22e29130ce087d5f25b2a31f470128a": { + "cbf69265acb5253067d9fc78cec3e7b151737dc0ba84d10aedd04a2c12f84bc4": { "source": { "path": "appsync-opensearch.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "afad76ea31dfbff09b61eded5f1d5e5fd22e29130ce087d5f25b2a31f470128a.json", + "objectKey": "cbf69265acb5253067d9fc78cec3e7b151737dc0ba84d10aedd04a2c12f84bc4.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/integ.graphql-opensearch.js.snapshot/appsync-opensearch.template.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/appsync-opensearch.template.json index b6e627fd979cb..9b3b8ea1cb382 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/appsync-opensearch.template.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/appsync-opensearch.template.json @@ -182,7 +182,7 @@ } } }, - "apidsQuerygetTestsResolver5C6FBB59": { + "apiQueryGetTests5F79F353": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/cdk.out b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/cdk.out index 8ecc185e9dbee..145739f539580 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/integ.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/integ.json index 2ff15a8cfcaaa..9082fbbe8ed5d 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "testCases": { "integ.graphql-opensearch": { "stacks": [ diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/manifest.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/manifest.json index c5b4953867628..81e53a3ee447f 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "artifacts": { "appsync-opensearch.assets": { "type": "cdk:asset-manifest", @@ -17,7 +17,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/afad76ea31dfbff09b61eded5f1d5e5fd22e29130ce087d5f25b2a31f470128a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cbf69265acb5253067d9fc78cec3e7b151737dc0ba84d10aedd04a2c12f84bc4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -81,10 +81,10 @@ "data": "apids4328272F" } ], - "/appsync-opensearch/api/ds/QuerygetTestsResolver/Resource": [ + "/appsync-opensearch/api/QueryGetTests/Resource": [ { "type": "aws:cdk:logicalId", - "data": "apidsQuerygetTestsResolver5C6FBB59" + "data": "apiQueryGetTests5F79F353" } ], "/appsync-opensearch/BootstrapVersion": [ @@ -98,6 +98,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "apidsQuerygetTestsResolver5C6FBB59": [ + { + "type": "aws:cdk:logicalId", + "data": "apidsQuerygetTestsResolver5C6FBB59", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "appsync-opensearch" diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/tree.json index e1b3a8f2b034e..7c9f3a92a3545 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/tree.json @@ -313,45 +313,45 @@ "fqn": "@aws-cdk/aws-appsync.CfnDataSource", "version": "0.0.0" } - }, - "QuerygetTestsResolver": { - "id": "QuerygetTestsResolver", - "path": "appsync-opensearch/api/ds/QuerygetTestsResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "appsync-opensearch/api/ds/QuerygetTestsResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "apiC8550315", - "ApiId" - ] - }, - "fieldName": "getTests", - "typeName": "Query", - "dataSourceName": "ds", - "kind": "UNIT", - "requestMappingTemplate": "{\"version\":\"2017-02-28\",\"operation\":\"GET\",\"path\":\"/id/post/_search\",\"params\":{\"headers\":{},\"queryString\":{},\"body\":{\"from\":0,\"size\":50}}}", - "responseMappingTemplate": "{\"version\":\"2017-02-28\",\"operation\":\"GET\",\"path\":\"/id/post/_search\",\"params\":{\"headers\":{},\"queryString\":{},\"body\":{\"from\":0,\"size\":50,\"query\":{\"term\":{\"author\":\"$util.toJson($context.arguments.author)\"}}}}}" - } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.OpenSearchDataSource", + "version": "0.0.0" + } + }, + "QueryGetTests": { + "id": "QueryGetTests", + "path": "appsync-opensearch/api/QueryGetTests", + "children": { + "Resource": { + "id": "Resource", + "path": "appsync-opensearch/api/QueryGetTests/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "apiC8550315", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "getTests", + "typeName": "Query", + "dataSourceName": "ds", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\":\"2017-02-28\",\"operation\":\"GET\",\"path\":\"/id/post/_search\",\"params\":{\"headers\":{},\"queryString\":{},\"body\":{\"from\":0,\"size\":50}}}", + "responseMappingTemplate": "{\"version\":\"2017-02-28\",\"operation\":\"GET\",\"path\":\"/id/post/_search\",\"params\":{\"headers\":{},\"queryString\":{},\"body\":{\"from\":0,\"size\":50,\"query\":{\"term\":{\"author\":\"$util.toJson($context.arguments.author)\"}}}}}" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.OpenSearchDataSource", + "fqn": "@aws-cdk/aws-appsync.Resolver", "version": "0.0.0" } } @@ -388,7 +388,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.182" } } }, diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.ts b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.ts index db7903a6deb5b..67d283b7ca1e6 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.ts @@ -27,7 +27,7 @@ const api = new appsync.GraphqlApi(stack, 'api', { const ds = api.addOpenSearchDataSource('ds', domain); -ds.createResolver({ +ds.createResolver('QueryGetTests', { typeName: 'Query', fieldName: 'getTests', requestMappingTemplate: appsync.MappingTemplate.fromString(JSON.stringify({ diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/aws-appsync-integ.assets.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/aws-appsync-integ.assets.json index c32e1bef4959b..1d67950b15b71 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/aws-appsync-integ.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/aws-appsync-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "22.0.0", "files": { - "5965527058acb79443e765fbe78cf2b94e89646caa2a13566464ecfd01ab4f33": { + "f0839c62a66861871198b19fa32c08fe6fdf19ee3c62c5204b12cee9c9f5f22d": { "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": "5965527058acb79443e765fbe78cf2b94e89646caa2a13566464ecfd01ab4f33.json", + "objectKey": "f0839c62a66861871198b19fa32c08fe6fdf19ee3c62c5204b12cee9c9f5f22d.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/integ.graphql.js.snapshot/aws-appsync-integ.template.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/aws-appsync-integ.template.json index e61ff4d7d2c7a..d6daf0ddedafb 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/aws-appsync-integ.template.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/aws-appsync-integ.template.json @@ -92,7 +92,7 @@ "Type": "NONE" } }, - "ApinoneQuerygetServiceVersionResolver336A3C2C": { + "ApiQuerygetServiceVersionDA048589": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -201,7 +201,206 @@ } } }, - "ApicustomerDsQuerygetCustomersResolverA74C8A2E": { + "ApiorderDsServiceRoleCC2040C0": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "ApiorderDsServiceRoleDefaultPolicy3315FCF4": { + "Type": "AWS::IAM::Policy", + "Properties": { + "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::GetAtt": [ + "OrderTable416EB896", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "OrderTable416EB896", + "Arn" + ] + }, + "/index/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ApiorderDsServiceRoleDefaultPolicy3315FCF4", + "Roles": [ + { + "Ref": "ApiorderDsServiceRoleCC2040C0" + } + ] + } + }, + "ApiorderDsB50C8AAD": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "Name": "Order", + "Type": "AMAZON_DYNAMODB", + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Ref": "OrderTable416EB896" + } + }, + "ServiceRoleArn": { + "Fn::GetAtt": [ + "ApiorderDsServiceRoleCC2040C0", + "Arn" + ] + } + } + }, + "ApipaymentDsServiceRole0DAC58D6": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "ApipaymentDsServiceRoleDefaultPolicy528E42B0": { + "Type": "AWS::IAM::Policy", + "Properties": { + "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" + } + ] + } + }, + "ApipaymentDs95C7AC36": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "Name": "Payment", + "Type": "AMAZON_DYNAMODB", + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": "PaymentTable" + }, + "ServiceRoleArn": { + "Fn::GetAtt": [ + "ApipaymentDsServiceRole0DAC58D6", + "Arn" + ] + } + } + }, + "ApiQueryGetCustomersAD7B06C3": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -222,7 +421,7 @@ "ApiSchema510EECD7" ] }, - "ApicustomerDsQuerygetCustomerResolver3649A130": { + "ApiQueryGetCustomer5EC5BDE8": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -243,7 +442,7 @@ "ApiSchema510EECD7" ] }, - "ApicustomerDsQuerygetCustomersNotConsistentResolver66499326": { + "ApiQueryGetCusomtersNotConsistent851627D3": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -264,7 +463,7 @@ "ApiSchema510EECD7" ] }, - "ApicustomerDsQuerygetCustomerNotConsistentResolverE173BDA3": { + "ApiQueryGetCustomerNotConsistent090667B1": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -285,7 +484,7 @@ "ApiSchema510EECD7" ] }, - "ApicustomerDsQuerygetCustomersConsistentResolver302CA74B": { + "ApiQueryGetCustomersConsistentCBD09D98": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -306,7 +505,7 @@ "ApiSchema510EECD7" ] }, - "ApicustomerDsQuerygetCustomerConsistentResolver0A30CD6C": { + "ApiQueryGetCustomerConsistentAE365D03": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -327,7 +526,7 @@ "ApiSchema510EECD7" ] }, - "ApicustomerDsMutationaddCustomerResolver4DE5B517": { + "ApiMutationAddCustomer4E43DA9D": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -348,7 +547,7 @@ "ApiSchema510EECD7" ] }, - "ApicustomerDsMutationsaveCustomerResolver241DD231": { + "ApiMutationSaveCustomer9E1B960E": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -369,7 +568,7 @@ "ApiSchema510EECD7" ] }, - "ApicustomerDsMutationsaveCustomerWithFirstOrderResolver7DE2CBC8": { + "ApiMutationSaveCustomerWithFirstOrder9E0E3BDE": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -390,7 +589,7 @@ "ApiSchema510EECD7" ] }, - "ApicustomerDsMutationremoveCustomerResolverAD3AE7F5": { + "ApiMutationRemoveCustomer9CB404E8": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -411,106 +610,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsServiceRoleCC2040C0": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ApiorderDsServiceRoleDefaultPolicy3315FCF4": { - "Type": "AWS::IAM::Policy", - "Properties": { - "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::GetAtt": [ - "OrderTable416EB896", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "OrderTable416EB896", - "Arn" - ] - }, - "/index/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ApiorderDsServiceRoleDefaultPolicy3315FCF4", - "Roles": [ - { - "Ref": "ApiorderDsServiceRoleCC2040C0" - } - ] - } - }, - "ApiorderDsB50C8AAD": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "Name": "Order", - "Type": "AMAZON_DYNAMODB", - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": { - "Ref": "OrderTable416EB896" - } - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "ApiorderDsServiceRoleCC2040C0", - "Arn" - ] - } - } - }, - "ApiorderDsQuerygetCustomerOrdersEqResolverEF9D5350": { + "ApiQueryGetCustomerOrdersEq8D77201B": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -531,7 +631,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersEqResolverE58570FF": { + "ApiQueryGetOrderCustomersEq37D9DEE0": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -552,7 +652,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersLtResolver909F3D8F": { + "ApiQueryGetCustomerOrdersLt0C55634C": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -573,7 +673,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersLtResolver77468800": { + "ApiQueryGetOrderCustomersLt4AB5E0F8": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -594,7 +694,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersLeResolverF230A8BE": { + "ApiQueryGetCustomerOrdersLe15936B5B": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -615,7 +715,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersLeResolver836A0389": { + "ApiQueryGetOrderCustomersLeE726F374": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -636,7 +736,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersGtResolverF01F806B": { + "ApiQueryGetCustomerOrdersGtAABE2A40": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -657,7 +757,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersGtResolver3197CCFE": { + "ApiQueryGetOrderCustomersGtB37E8428": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -678,7 +778,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersGeResolver63CAD303": { + "ApiQueryGetCustomerOrdersGeD1854D76": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -699,7 +799,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersGeResolver0B78B0B4": { + "ApiQueryGetOrderCustomersGe1790C495": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -720,7 +820,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersNotConsistentEqResolver242A8314": { + "ApiQueryGetCustomerOrdersNotConsistentEqD733058C": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -741,7 +841,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersNotConsistentEqResolver53CBADD9": { + "ApiQueryGetOrderCustomersNotConsistentEq3BE248FE": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -762,7 +862,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersNotConsistentLtResolver5259538F": { + "ApiQueryGetCustomerOrdersNotConsistentLt7B43587C": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -783,7 +883,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersNotConsistentLtResolver322C467A": { + "ApiQueryGetOrderCustomersNotConsistentLt3B88F412": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -804,7 +904,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersNotConsistentLeResolver2DB38FDE": { + "ApiQueryGetCustomerOrdersNotConsistentLe8817EDDB": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -825,7 +925,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersNotConsistentLeResolver8A28C79C": { + "ApiQueryGetOrderCustomersNotConsistentLe09B90BC1": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -846,7 +946,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersNotConsistentGtResolverD7C416AD": { + "ApiQueryGetCustomerOrdersNotConsistentGt92879DB9": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -867,7 +967,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersNotConsistentGtResolver91BD36C9": { + "ApiQueryGetOrderCustomersNotConsistentGt6C9F2F8F": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -888,7 +988,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersNotConsistentGeResolver0E9FE662": { + "ApiQueryGetCustomerOrdersNotConsistentGe8F8AA1E1": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -909,7 +1009,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersNotConsistentGeResolver555023D7": { + "ApiQueryGetOrderCustomersNotConsistentGe76FFC40E": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -930,7 +1030,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersConsistentEqResolver0A400223": { + "ApiQueryGetCustomerOrdersConsistentEq653D75B6": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -951,7 +1051,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersConsistentEqResolverF54BDAB4": { + "ApiQueryGetOrderCustomersConsistentEq6C9CAA47": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -972,7 +1072,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersConsistentLtResolver73E118EE": { + "ApiQueryGetCustomerOrdersConsistentLt250BF7EC": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -993,7 +1093,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersConsistentLtResolver8B18EA77": { + "ApiQueryGetOrderCustomersConsistentLtB4B34793": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -1014,7 +1114,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersConsistentLeResolverEA8D11EE": { + "ApiQueryGetCustomerOrdersConsistentLeECDEAB1B": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -1035,7 +1135,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersConsistentLeResolverB027B939": { + "ApiQueryGetOrderCustomersConsistentLeA46A454C": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -1056,7 +1156,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersConsistentGtResolverD927E07A": { + "ApiQueryGetCustomerOrdersConsistentGtBC4B2EDF": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -1077,7 +1177,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersConsistentGtResolver58B23E21": { + "ApiQueryGetOrderCustomersConsistentGt8185C8F7": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -1098,7 +1198,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersConsistentGeResolverB8F83696": { + "ApiQueryGetCustomerOrdersConsistentGeB76BCC43": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -1119,7 +1219,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersConsistentGeResolver674A5CD5": { + "ApiQueryGetOrderCustomersConsistentGeCE4A2D21": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -1140,7 +1240,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersFilterResolverCD2B8747": { + "ApiQueryGetCustomerOrdersFilter854FF70B": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -1161,7 +1261,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetCustomerOrdersBetweenResolver7DEE368E": { + "ApiQueryGetCustomerOrdersBetween40B365B9": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -1182,7 +1282,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersFilterResolver628CC68D": { + "ApiQueryGetOrderCustomersFilter4E08981B": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -1203,7 +1303,7 @@ "ApiSchema510EECD7" ] }, - "ApiorderDsQuerygetOrderCustomersBetweenResolver2048F3CB": { + "ApiQueryGetOrderCustomersBetween7C2EFCFE": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -1224,107 +1324,7 @@ "ApiSchema510EECD7" ] }, - "ApipaymentDsServiceRole0DAC58D6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ApipaymentDsServiceRoleDefaultPolicy528E42B0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "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" - } - ] - } - }, - "ApipaymentDs95C7AC36": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "Name": "Payment", - "Type": "AMAZON_DYNAMODB", - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": "PaymentTable" - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "ApipaymentDsServiceRole0DAC58D6", - "Arn" - ] - } - } - }, - "ApipaymentDsQuerygetPaymentResolverD172BFC9": { + "ApiQueryGetPayment26F71513": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -1345,7 +1345,7 @@ "ApiSchema510EECD7" ] }, - "ApipaymentDsQuerygetPaymentConsistentResolver05C2ACB8": { + "ApiQueryGetPaymentConsistent0440A8CE": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -1366,7 +1366,7 @@ "ApiSchema510EECD7" ] }, - "ApipaymentDsMutationsavePaymentResolverE09FE5BB": { + "ApiMutationSavePayment63C236F7": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { @@ -1426,7 +1426,7 @@ } } }, - "ApidsMutationdoPostOnAwsResolver9583D8A3": { + "ApiMutationDoPostOnAws6DBBF12B": { "Type": "AWS::AppSync::Resolver", "Properties": { "ApiId": { diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/cdk.out b/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/cdk.out index 8ecc185e9dbee..145739f539580 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/integ.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/integ.json index 7ea468371e6eb..0d615ad95144d 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "testCases": { "integ.graphql": { "stacks": [ diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/manifest.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/manifest.json index c0fca1d7119a2..5e7edc082b402 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "artifacts": { "aws-appsync-integ.assets": { "type": "cdk:asset-manifest", @@ -17,7 +17,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5965527058acb79443e765fbe78cf2b94e89646caa2a13566464ecfd01ab4f33.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f0839c62a66861871198b19fa32c08fe6fdf19ee3c62c5204b12cee9c9f5f22d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -63,10 +63,10 @@ "data": "Apinone1F55F3F3" } ], - "/aws-appsync-integ/Api/none/QuerygetServiceVersionResolver/Resource": [ + "/aws-appsync-integ/Api/QuerygetServiceVersion/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApinoneQuerygetServiceVersionResolver336A3C2C" + "data": "ApiQuerygetServiceVersionDA048589" } ], "/aws-appsync-integ/Api/customerDs/ServiceRole/Resource": [ @@ -87,322 +87,322 @@ "data": "ApicustomerDsFE73DAC5" } ], - "/aws-appsync-integ/Api/customerDs/QuerygetCustomersResolver/Resource": [ + "/aws-appsync-integ/Api/orderDs/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApicustomerDsQuerygetCustomersResolverA74C8A2E" + "data": "ApiorderDsServiceRoleCC2040C0" } ], - "/aws-appsync-integ/Api/customerDs/QuerygetCustomerResolver/Resource": [ + "/aws-appsync-integ/Api/orderDs/ServiceRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApicustomerDsQuerygetCustomerResolver3649A130" + "data": "ApiorderDsServiceRoleDefaultPolicy3315FCF4" } ], - "/aws-appsync-integ/Api/customerDs/QuerygetCustomersNotConsistentResolver/Resource": [ + "/aws-appsync-integ/Api/orderDs/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApicustomerDsQuerygetCustomersNotConsistentResolver66499326" + "data": "ApiorderDsB50C8AAD" } ], - "/aws-appsync-integ/Api/customerDs/QuerygetCustomerNotConsistentResolver/Resource": [ + "/aws-appsync-integ/Api/paymentDs/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApicustomerDsQuerygetCustomerNotConsistentResolverE173BDA3" + "data": "ApipaymentDsServiceRole0DAC58D6" } ], - "/aws-appsync-integ/Api/customerDs/QuerygetCustomersConsistentResolver/Resource": [ + "/aws-appsync-integ/Api/paymentDs/ServiceRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApicustomerDsQuerygetCustomersConsistentResolver302CA74B" + "data": "ApipaymentDsServiceRoleDefaultPolicy528E42B0" } ], - "/aws-appsync-integ/Api/customerDs/QuerygetCustomerConsistentResolver/Resource": [ + "/aws-appsync-integ/Api/paymentDs/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApicustomerDsQuerygetCustomerConsistentResolver0A30CD6C" + "data": "ApipaymentDs95C7AC36" } ], - "/aws-appsync-integ/Api/customerDs/MutationaddCustomerResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomers/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApicustomerDsMutationaddCustomerResolver4DE5B517" + "data": "ApiQueryGetCustomersAD7B06C3" } ], - "/aws-appsync-integ/Api/customerDs/MutationsaveCustomerResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomer/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApicustomerDsMutationsaveCustomerResolver241DD231" + "data": "ApiQueryGetCustomer5EC5BDE8" } ], - "/aws-appsync-integ/Api/customerDs/MutationsaveCustomerWithFirstOrderResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCusomtersNotConsistent/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApicustomerDsMutationsaveCustomerWithFirstOrderResolver7DE2CBC8" + "data": "ApiQueryGetCusomtersNotConsistent851627D3" } ], - "/aws-appsync-integ/Api/customerDs/MutationremoveCustomerResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerNotConsistent/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApicustomerDsMutationremoveCustomerResolverAD3AE7F5" + "data": "ApiQueryGetCustomerNotConsistent090667B1" } ], - "/aws-appsync-integ/Api/orderDs/ServiceRole/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomersConsistent/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsServiceRoleCC2040C0" + "data": "ApiQueryGetCustomersConsistentCBD09D98" } ], - "/aws-appsync-integ/Api/orderDs/ServiceRole/DefaultPolicy/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerConsistent/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsServiceRoleDefaultPolicy3315FCF4" + "data": "ApiQueryGetCustomerConsistentAE365D03" } ], - "/aws-appsync-integ/Api/orderDs/Resource": [ + "/aws-appsync-integ/Api/MutationAddCustomer/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsB50C8AAD" + "data": "ApiMutationAddCustomer4E43DA9D" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersEqResolver/Resource": [ + "/aws-appsync-integ/Api/MutationSaveCustomer/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersEqResolverEF9D5350" + "data": "ApiMutationSaveCustomer9E1B960E" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersEqResolver/Resource": [ + "/aws-appsync-integ/Api/MutationSaveCustomerWithFirstOrder/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersEqResolverE58570FF" + "data": "ApiMutationSaveCustomerWithFirstOrder9E0E3BDE" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersLtResolver/Resource": [ + "/aws-appsync-integ/Api/MutationRemoveCustomer/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersLtResolver909F3D8F" + "data": "ApiMutationRemoveCustomer9CB404E8" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersLtResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersEq/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersLtResolver77468800" + "data": "ApiQueryGetCustomerOrdersEq8D77201B" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersLeResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersEq/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersLeResolverF230A8BE" + "data": "ApiQueryGetOrderCustomersEq37D9DEE0" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersLeResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersLt/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersLeResolver836A0389" + "data": "ApiQueryGetCustomerOrdersLt0C55634C" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersGtResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersLt/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersGtResolverF01F806B" + "data": "ApiQueryGetOrderCustomersLt4AB5E0F8" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersGtResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersLe/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersGtResolver3197CCFE" + "data": "ApiQueryGetCustomerOrdersLe15936B5B" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersGeResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersLe/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersGeResolver63CAD303" + "data": "ApiQueryGetOrderCustomersLeE726F374" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersGeResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersGt/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersGeResolver0B78B0B4" + "data": "ApiQueryGetCustomerOrdersGtAABE2A40" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentEqResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersGt/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentEqResolver242A8314" + "data": "ApiQueryGetOrderCustomersGtB37E8428" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentEqResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersGe/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersNotConsistentEqResolver53CBADD9" + "data": "ApiQueryGetCustomerOrdersGeD1854D76" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLtResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersGe/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentLtResolver5259538F" + "data": "ApiQueryGetOrderCustomersGe1790C495" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentLtResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersNotConsistentEq/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersNotConsistentLtResolver322C467A" + "data": "ApiQueryGetCustomerOrdersNotConsistentEqD733058C" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLeResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersNotConsistentEq/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentLeResolver2DB38FDE" + "data": "ApiQueryGetOrderCustomersNotConsistentEq3BE248FE" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentLeResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersNotConsistentLt/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersNotConsistentLeResolver8A28C79C" + "data": "ApiQueryGetCustomerOrdersNotConsistentLt7B43587C" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentGtResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersNotConsistentLt/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentGtResolverD7C416AD" + "data": "ApiQueryGetOrderCustomersNotConsistentLt3B88F412" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentGtResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersNotConsistentLe/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersNotConsistentGtResolver91BD36C9" + "data": "ApiQueryGetCustomerOrdersNotConsistentLe8817EDDB" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentGeResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersNotConsistentLe/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentGeResolver0E9FE662" + "data": "ApiQueryGetOrderCustomersNotConsistentLe09B90BC1" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentGeResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersNotConsistentGt/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersNotConsistentGeResolver555023D7" + "data": "ApiQueryGetCustomerOrdersNotConsistentGt92879DB9" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentEqResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersNotConsistentGt/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersConsistentEqResolver0A400223" + "data": "ApiQueryGetOrderCustomersNotConsistentGt6C9F2F8F" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentEqResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersNotConsistentGe/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersConsistentEqResolverF54BDAB4" + "data": "ApiQueryGetCustomerOrdersNotConsistentGe8F8AA1E1" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentLtResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersNotConsistentGe/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersConsistentLtResolver73E118EE" + "data": "ApiQueryGetOrderCustomersNotConsistentGe76FFC40E" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentLtResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersConsistentEq/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersConsistentLtResolver8B18EA77" + "data": "ApiQueryGetCustomerOrdersConsistentEq653D75B6" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentLeResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersConsistentEq/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersConsistentLeResolverEA8D11EE" + "data": "ApiQueryGetOrderCustomersConsistentEq6C9CAA47" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentLeResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersConsistentLt/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersConsistentLeResolverB027B939" + "data": "ApiQueryGetCustomerOrdersConsistentLt250BF7EC" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentGtResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersConsistentLt/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersConsistentGtResolverD927E07A" + "data": "ApiQueryGetOrderCustomersConsistentLtB4B34793" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentGtResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersConsistentLe/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersConsistentGtResolver58B23E21" + "data": "ApiQueryGetCustomerOrdersConsistentLeECDEAB1B" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentGeResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersConsistentLe/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersConsistentGeResolverB8F83696" + "data": "ApiQueryGetOrderCustomersConsistentLeA46A454C" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentGeResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersConsistentGt/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersConsistentGeResolver674A5CD5" + "data": "ApiQueryGetCustomerOrdersConsistentGtBC4B2EDF" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersFilterResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersConsistentGt/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersFilterResolverCD2B8747" + "data": "ApiQueryGetOrderCustomersConsistentGt8185C8F7" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersBetweenResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersConsistentGe/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetCustomerOrdersBetweenResolver7DEE368E" + "data": "ApiQueryGetCustomerOrdersConsistentGeB76BCC43" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersFilterResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersConsistentGe/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersFilterResolver628CC68D" + "data": "ApiQueryGetOrderCustomersConsistentGeCE4A2D21" } ], - "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersBetweenResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersFilter/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApiorderDsQuerygetOrderCustomersBetweenResolver2048F3CB" + "data": "ApiQueryGetCustomerOrdersFilter854FF70B" } ], - "/aws-appsync-integ/Api/paymentDs/ServiceRole/Resource": [ + "/aws-appsync-integ/Api/QueryGetCustomerOrdersBetween/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApipaymentDsServiceRole0DAC58D6" + "data": "ApiQueryGetCustomerOrdersBetween40B365B9" } ], - "/aws-appsync-integ/Api/paymentDs/ServiceRole/DefaultPolicy/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersFilter/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApipaymentDsServiceRoleDefaultPolicy528E42B0" + "data": "ApiQueryGetOrderCustomersFilter4E08981B" } ], - "/aws-appsync-integ/Api/paymentDs/Resource": [ + "/aws-appsync-integ/Api/QueryGetOrderCustomersBetween/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApipaymentDs95C7AC36" + "data": "ApiQueryGetOrderCustomersBetween7C2EFCFE" } ], - "/aws-appsync-integ/Api/paymentDs/QuerygetPaymentResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetPayment/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApipaymentDsQuerygetPaymentResolverD172BFC9" + "data": "ApiQueryGetPayment26F71513" } ], - "/aws-appsync-integ/Api/paymentDs/QuerygetPaymentConsistentResolver/Resource": [ + "/aws-appsync-integ/Api/QueryGetPaymentConsistent/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApipaymentDsQuerygetPaymentConsistentResolver05C2ACB8" + "data": "ApiQueryGetPaymentConsistent0440A8CE" } ], - "/aws-appsync-integ/Api/paymentDs/MutationsavePaymentResolver/Resource": [ + "/aws-appsync-integ/Api/MutationSavePayment/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApipaymentDsMutationsavePaymentResolverE09FE5BB" + "data": "ApiMutationSavePayment63C236F7" } ], "/aws-appsync-integ/Api/ds/ServiceRole/Resource": [ @@ -417,10 +417,10 @@ "data": "Apids0DB53FEA" } ], - "/aws-appsync-integ/Api/ds/MutationdoPostOnAwsResolver/Resource": [ + "/aws-appsync-integ/Api/MutationDoPostOnAws/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ApidsMutationdoPostOnAwsResolver9583D8A3" + "data": "ApiMutationDoPostOnAws6DBBF12B" } ], "/aws-appsync-integ/CustomerTable/Resource": [ @@ -452,6 +452,447 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "ApinoneQuerygetServiceVersionResolver336A3C2C": [ + { + "type": "aws:cdk:logicalId", + "data": "ApinoneQuerygetServiceVersionResolver336A3C2C", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApicustomerDsQuerygetCustomersResolverA74C8A2E": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsQuerygetCustomersResolverA74C8A2E", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApicustomerDsQuerygetCustomerResolver3649A130": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsQuerygetCustomerResolver3649A130", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApicustomerDsQuerygetCustomersNotConsistentResolver66499326": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsQuerygetCustomersNotConsistentResolver66499326", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApicustomerDsQuerygetCustomerNotConsistentResolverE173BDA3": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsQuerygetCustomerNotConsistentResolverE173BDA3", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApicustomerDsQuerygetCustomersConsistentResolver302CA74B": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsQuerygetCustomersConsistentResolver302CA74B", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApicustomerDsQuerygetCustomerConsistentResolver0A30CD6C": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsQuerygetCustomerConsistentResolver0A30CD6C", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApicustomerDsMutationaddCustomerResolver4DE5B517": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsMutationaddCustomerResolver4DE5B517", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApicustomerDsMutationsaveCustomerResolver241DD231": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsMutationsaveCustomerResolver241DD231", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApicustomerDsMutationsaveCustomerWithFirstOrderResolver7DE2CBC8": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsMutationsaveCustomerWithFirstOrderResolver7DE2CBC8", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApicustomerDsMutationremoveCustomerResolverAD3AE7F5": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsMutationremoveCustomerResolverAD3AE7F5", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersEqResolverEF9D5350": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersEqResolverEF9D5350", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersEqResolverE58570FF": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersEqResolverE58570FF", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersLtResolver909F3D8F": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersLtResolver909F3D8F", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersLtResolver77468800": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersLtResolver77468800", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersLeResolverF230A8BE": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersLeResolverF230A8BE", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersLeResolver836A0389": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersLeResolver836A0389", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersGtResolverF01F806B": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersGtResolverF01F806B", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersGtResolver3197CCFE": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersGtResolver3197CCFE", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersGeResolver63CAD303": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersGeResolver63CAD303", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersGeResolver0B78B0B4": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersGeResolver0B78B0B4", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersNotConsistentEqResolver242A8314": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentEqResolver242A8314", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersNotConsistentEqResolver53CBADD9": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersNotConsistentEqResolver53CBADD9", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersNotConsistentLtResolver5259538F": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentLtResolver5259538F", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersNotConsistentLtResolver322C467A": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersNotConsistentLtResolver322C467A", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersNotConsistentLeResolver2DB38FDE": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentLeResolver2DB38FDE", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersNotConsistentLeResolver8A28C79C": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersNotConsistentLeResolver8A28C79C", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersNotConsistentGtResolverD7C416AD": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentGtResolverD7C416AD", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersNotConsistentGtResolver91BD36C9": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersNotConsistentGtResolver91BD36C9", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersNotConsistentGeResolver0E9FE662": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentGeResolver0E9FE662", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersNotConsistentGeResolver555023D7": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersNotConsistentGeResolver555023D7", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersConsistentEqResolver0A400223": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersConsistentEqResolver0A400223", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersConsistentEqResolverF54BDAB4": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersConsistentEqResolverF54BDAB4", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersConsistentLtResolver73E118EE": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersConsistentLtResolver73E118EE", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersConsistentLtResolver8B18EA77": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersConsistentLtResolver8B18EA77", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersConsistentLeResolverEA8D11EE": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersConsistentLeResolverEA8D11EE", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersConsistentLeResolverB027B939": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersConsistentLeResolverB027B939", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersConsistentGtResolverD927E07A": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersConsistentGtResolverD927E07A", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersConsistentGtResolver58B23E21": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersConsistentGtResolver58B23E21", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersConsistentGeResolverB8F83696": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersConsistentGeResolverB8F83696", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersConsistentGeResolver674A5CD5": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersConsistentGeResolver674A5CD5", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersFilterResolverCD2B8747": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersFilterResolverCD2B8747", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetCustomerOrdersBetweenResolver7DEE368E": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersBetweenResolver7DEE368E", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersFilterResolver628CC68D": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersFilterResolver628CC68D", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApiorderDsQuerygetOrderCustomersBetweenResolver2048F3CB": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersBetweenResolver2048F3CB", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApipaymentDsQuerygetPaymentResolverD172BFC9": [ + { + "type": "aws:cdk:logicalId", + "data": "ApipaymentDsQuerygetPaymentResolverD172BFC9", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApipaymentDsQuerygetPaymentConsistentResolver05C2ACB8": [ + { + "type": "aws:cdk:logicalId", + "data": "ApipaymentDsQuerygetPaymentConsistentResolver05C2ACB8", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApipaymentDsMutationsavePaymentResolverE09FE5BB": [ + { + "type": "aws:cdk:logicalId", + "data": "ApipaymentDsMutationsavePaymentResolverE09FE5BB", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "ApidsMutationdoPostOnAwsResolver9583D8A3": [ + { + "type": "aws:cdk:logicalId", + "data": "ApidsMutationdoPostOnAwsResolver9583D8A3", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-appsync-integ" diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/tree.json index b58920fcbfeb4..685ecb931fde0 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql.js.snapshot/tree.json @@ -160,45 +160,45 @@ "fqn": "@aws-cdk/aws-appsync.CfnDataSource", "version": "0.0.0" } - }, - "QuerygetServiceVersionResolver": { - "id": "QuerygetServiceVersionResolver", - "path": "aws-appsync-integ/Api/none/QuerygetServiceVersionResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/none/QuerygetServiceVersionResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "getServiceVersion", - "typeName": "Query", - "dataSourceName": "None", - "kind": "UNIT", - "requestMappingTemplate": "{\"version\":\"2017-02-28\"}", - "responseMappingTemplate": "{\"version\":\"v1\"}" - } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.NoneDataSource", + "version": "0.0.0" + } + }, + "QuerygetServiceVersion": { + "id": "QuerygetServiceVersion", + "path": "aws-appsync-integ/Api/QuerygetServiceVersion", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QuerygetServiceVersion/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "getServiceVersion", + "typeName": "Query", + "dataSourceName": "None", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\":\"2017-02-28\"}", + "responseMappingTemplate": "{\"version\":\"v1\"}" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.NoneDataSource", + "fqn": "@aws-cdk/aws-appsync.Resolver", "version": "0.0.0" } }, @@ -345,356 +345,6 @@ "fqn": "@aws-cdk/aws-appsync.CfnDataSource", "version": "0.0.0" } - }, - "QuerygetCustomersResolver": { - "id": "QuerygetCustomersResolver", - "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomersResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomersResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "getCustomers", - "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" - } - }, - "QuerygetCustomerResolver": { - "id": "QuerygetCustomerResolver", - "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomerResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomerResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "getCustomer", - "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)" - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", - "version": "0.0.0" - } - }, - "MutationaddCustomerResolver": { - "id": "MutationaddCustomerResolver", - "path": "aws-appsync-integ/Api/customerDs/MutationaddCustomerResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/customerDs/MutationaddCustomerResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "addCustomer", - "typeName": "Mutation", - "dataSourceName": "Customer", - "kind": "UNIT", - "requestMappingTemplate": "\n #set($input = $ctx.args.customer)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", - "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" - } - }, - "MutationsaveCustomerResolver": { - "id": "MutationsaveCustomerResolver", - "path": "aws-appsync-integ/Api/customerDs/MutationsaveCustomerResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/customerDs/MutationsaveCustomerResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "saveCustomer", - "typeName": "Mutation", - "dataSourceName": "Customer", - "kind": "UNIT", - "requestMappingTemplate": "\n #set($input = $ctx.args.customer)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($ctx.args.id)\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", - "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" - } - }, - "MutationsaveCustomerWithFirstOrderResolver": { - "id": "MutationsaveCustomerWithFirstOrderResolver", - "path": "aws-appsync-integ/Api/customerDs/MutationsaveCustomerWithFirstOrderResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/customerDs/MutationsaveCustomerWithFirstOrderResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "saveCustomerWithFirstOrder", - "typeName": "Mutation", - "dataSourceName": "Customer", - "kind": "UNIT", - "requestMappingTemplate": "\n #set($input = $ctx.args.order)\n $util.qr($input.put(\"referral\", referral))\n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"order\" : $util.dynamodb.toDynamoDBJson($util.autoId()),\"customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer.id)\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", - "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" - } - }, - "MutationremoveCustomerResolver": { - "id": "MutationremoveCustomerResolver", - "path": "aws-appsync-integ/Api/customerDs/MutationremoveCustomerResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/customerDs/MutationremoveCustomerResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "removeCustomer", - "typeName": "Mutation", - "dataSourceName": "Customer", - "kind": "UNIT", - "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"DeleteItem\", \"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" - } } }, "constructInfo": { @@ -856,1331 +506,1689 @@ "fqn": "@aws-cdk/aws-appsync.CfnDataSource", "version": "0.0.0" } - }, - "QuerygetCustomerOrdersEqResolver": { - "id": "QuerygetCustomerOrdersEqResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersEqResolver", + } + }, + "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/orderDs/QuerygetCustomerOrdersEqResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "getCustomerOrdersEq", - "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)" - } - }, + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-appsync-integ/Api/paymentDs/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "fqn": "@aws-cdk/core.Resource", "version": "0.0.0" } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", - "version": "0.0.0" - } - }, - "QuerygetOrderCustomersEqResolver": { - "id": "QuerygetOrderCustomersEqResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersEqResolver", - "children": { + }, "Resource": { "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersEqResolver/Resource", + "path": "aws-appsync-integ/Api/paymentDs/ServiceRole/Resource", "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:type": "AWS::IAM::Role", "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "getOrderCustomersEq", - "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)" + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "fqn": "@aws-cdk/aws-iam.CfnRole", "version": "0.0.0" } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", - "version": "0.0.0" - } - }, - "QuerygetCustomerOrdersLtResolver": { - "id": "QuerygetCustomerOrdersLtResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersLtResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersLtResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] + }, + "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" + } + ] + } }, - "fieldName": "getCustomerOrdersLt", - "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.CfnPolicy", + "version": "0.0.0" + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "fqn": "@aws-cdk/aws-iam.Policy", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", + "fqn": "@aws-cdk/aws-iam.Role", "version": "0.0.0" } }, - "QuerygetOrderCustomersLtResolver": { - "id": "QuerygetOrderCustomersLtResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersLtResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersLtResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "getOrderCustomersLt", - "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)" + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/paymentDs/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::DataSource", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "name": "Payment", + "type": "AMAZON_DYNAMODB", + "dynamoDbConfig": { + "tableName": "PaymentTable", + "awsRegion": { + "Ref": "AWS::Region" } }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" + "serviceRoleArn": { + "Fn::GetAtt": [ + "ApipaymentDsServiceRole0DAC58D6", + "Arn" + ] } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnDataSource", "version": "0.0.0" } - }, - "QuerygetCustomerOrdersLeResolver": { - "id": "QuerygetCustomerOrdersLeResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersLeResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersLeResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "getCustomerOrdersLe", - "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.DynamoDbDataSource", + "version": "0.0.0" + } + }, + "QueryGetCustomers": { + "id": "QueryGetCustomers", + "path": "aws-appsync-integ/Api/QueryGetCustomers", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomers/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "getCustomers", + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } - }, - "QuerygetOrderCustomersLeResolver": { - "id": "QuerygetOrderCustomersLeResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersLeResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersLeResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "getOrderCustomersLe", - "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetCustomer": { + "id": "QueryGetCustomer", + "path": "aws-appsync-integ/Api/QueryGetCustomer", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomer/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomer", + "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" + } + }, + "QueryGetCusomtersNotConsistent": { + "id": "QueryGetCusomtersNotConsistent", + "path": "aws-appsync-integ/Api/QueryGetCusomtersNotConsistent", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCusomtersNotConsistent/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" + } + }, + "QueryGetCustomerNotConsistent": { + "id": "QueryGetCustomerNotConsistent", + "path": "aws-appsync-integ/Api/QueryGetCustomerNotConsistent", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerNotConsistent/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" + } + }, + "QueryGetCustomersConsistent": { + "id": "QueryGetCustomersConsistent", + "path": "aws-appsync-integ/Api/QueryGetCustomersConsistent", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomersConsistent/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" + } + }, + "QueryGetCustomerConsistent": { + "id": "QueryGetCustomerConsistent", + "path": "aws-appsync-integ/Api/QueryGetCustomerConsistent", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerConsistent/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)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "MutationAddCustomer": { + "id": "MutationAddCustomer", + "path": "aws-appsync-integ/Api/MutationAddCustomer", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/MutationAddCustomer/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "addCustomer", + "typeName": "Mutation", + "dataSourceName": "Customer", + "kind": "UNIT", + "requestMappingTemplate": "\n #set($input = $ctx.args.customer)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", + "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" + } + }, + "MutationSaveCustomer": { + "id": "MutationSaveCustomer", + "path": "aws-appsync-integ/Api/MutationSaveCustomer", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/MutationSaveCustomer/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "saveCustomer", + "typeName": "Mutation", + "dataSourceName": "Customer", + "kind": "UNIT", + "requestMappingTemplate": "\n #set($input = $ctx.args.customer)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($ctx.args.id)\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", + "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" + } + }, + "MutationSaveCustomerWithFirstOrder": { + "id": "MutationSaveCustomerWithFirstOrder", + "path": "aws-appsync-integ/Api/MutationSaveCustomerWithFirstOrder", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/MutationSaveCustomerWithFirstOrder/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "saveCustomerWithFirstOrder", + "typeName": "Mutation", + "dataSourceName": "Customer", + "kind": "UNIT", + "requestMappingTemplate": "\n #set($input = $ctx.args.order)\n $util.qr($input.put(\"referral\", referral))\n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"order\" : $util.dynamodb.toDynamoDBJson($util.autoId()),\"customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer.id)\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", + "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" + } + }, + "MutationRemoveCustomer": { + "id": "MutationRemoveCustomer", + "path": "aws-appsync-integ/Api/MutationRemoveCustomer", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/MutationRemoveCustomer/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "removeCustomer", + "typeName": "Mutation", + "dataSourceName": "Customer", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"DeleteItem\", \"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" + } + }, + "QueryGetCustomerOrdersEq": { + "id": "QueryGetCustomerOrdersEq", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersEq", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersEq/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersEq", + "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" + } + }, + "QueryGetOrderCustomersEq": { + "id": "QueryGetOrderCustomersEq", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersEq", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersEq/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersEq", + "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" + } + }, + "QueryGetCustomerOrdersLt": { + "id": "QueryGetCustomerOrdersLt", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersLt", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersLt/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersLt", + "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" + } + }, + "QueryGetOrderCustomersLt": { + "id": "QueryGetOrderCustomersLt", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersLt", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersLt/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersLt", + "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" + } + }, + "QueryGetCustomerOrdersLe": { + "id": "QueryGetCustomerOrdersLe", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersLe", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersLe/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "getCustomerOrdersLe", + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } - }, - "QuerygetCustomerOrdersGtResolver": { - "id": "QuerygetCustomerOrdersGtResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersGtResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersGtResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "getCustomerOrdersGt", - "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetOrderCustomersLe": { + "id": "QueryGetOrderCustomersLe", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersLe", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersLe/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "getOrderCustomersLe", + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } - }, - "QuerygetOrderCustomersGtResolver": { - "id": "QuerygetOrderCustomersGtResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersGtResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersGtResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "getOrderCustomersGt", - "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetCustomerOrdersGt": { + "id": "QueryGetCustomerOrdersGt", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersGt", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersGt/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "getCustomerOrdersGt", + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } - }, - "QuerygetCustomerOrdersGeResolver": { - "id": "QuerygetCustomerOrdersGeResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersGeResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersGeResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "getCustomerOrdersGe", - "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetOrderCustomersGt": { + "id": "QueryGetOrderCustomersGt", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersGt", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersGt/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "getOrderCustomersGt", + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } - }, - "QuerygetOrderCustomersGeResolver": { - "id": "QuerygetOrderCustomersGeResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersGeResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersGeResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "getOrderCustomersGe", - "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetCustomerOrdersGe": { + "id": "QueryGetCustomerOrdersGe", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersGe", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersGe/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "getCustomerOrdersGe", + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } - }, - "QuerygetCustomerOrdersNotConsistentEqResolver": { - "id": "QuerygetCustomerOrdersNotConsistentEqResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentEqResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentEqResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "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)" - } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QueryGetOrderCustomersGe": { + "id": "QueryGetOrderCustomersGe", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersGe", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersGe/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "getOrderCustomersGe", + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } - }, - "QuerygetOrderCustomersNotConsistentEqResolver": { - "id": "QuerygetOrderCustomersNotConsistentEqResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentEqResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentEqResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "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)" - } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QueryGetCustomerOrdersNotConsistentEq": { + "id": "QueryGetCustomerOrdersNotConsistentEq", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersNotConsistentEq", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersNotConsistentEq/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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)" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } - }, - "QuerygetCustomerOrdersNotConsistentLtResolver": { - "id": "QuerygetCustomerOrdersNotConsistentLtResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLtResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLtResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "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)" - } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QueryGetOrderCustomersNotConsistentEq": { + "id": "QueryGetOrderCustomersNotConsistentEq", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersNotConsistentEq", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersNotConsistentEq/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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)" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } - }, - "QuerygetOrderCustomersNotConsistentLtResolver": { - "id": "QuerygetOrderCustomersNotConsistentLtResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentLtResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentLtResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "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)" - } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QueryGetCustomerOrdersNotConsistentLt": { + "id": "QueryGetCustomerOrdersNotConsistentLt", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersNotConsistentLt", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersNotConsistentLt/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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)" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } - }, - "QuerygetCustomerOrdersNotConsistentLeResolver": { - "id": "QuerygetCustomerOrdersNotConsistentLeResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLeResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLeResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "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-appsync.Resolver", + "version": "0.0.0" + } + }, + "QueryGetOrderCustomersNotConsistentLt": { + "id": "QueryGetOrderCustomersNotConsistentLt", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersNotConsistentLt", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersNotConsistentLt/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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)" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetCustomerOrdersNotConsistentLe": { + "id": "QueryGetCustomerOrdersNotConsistentLe", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersNotConsistentLe", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersNotConsistentLe/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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-appsync.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetOrderCustomersNotConsistentLe": { + "id": "QueryGetOrderCustomersNotConsistentLe", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersNotConsistentLe", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersNotConsistentLe/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetCustomerOrdersNotConsistentGt": { + "id": "QueryGetCustomerOrdersNotConsistentGt", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersNotConsistentGt", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersNotConsistentGt/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetOrderCustomersNotConsistentGt": { + "id": "QueryGetOrderCustomersNotConsistentGt", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersNotConsistentGt", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersNotConsistentGt/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetCustomerOrdersNotConsistentGe": { + "id": "QueryGetCustomerOrdersNotConsistentGe", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersNotConsistentGe", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersNotConsistentGe/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetOrderCustomersNotConsistentGe": { + "id": "QueryGetOrderCustomersNotConsistentGe", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersNotConsistentGe", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersNotConsistentGe/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetCustomerOrdersConsistentEq": { + "id": "QueryGetCustomerOrdersConsistentEq", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersConsistentEq", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersConsistentEq/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetOrderCustomersConsistentEq": { + "id": "QueryGetOrderCustomersConsistentEq", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersConsistentEq", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersConsistentEq/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetCustomerOrdersConsistentLt": { + "id": "QueryGetCustomerOrdersConsistentLt", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersConsistentLt", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersConsistentLt/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetOrderCustomersConsistentLt": { + "id": "QueryGetOrderCustomersConsistentLt", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersConsistentLt", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersConsistentLt/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetCustomerOrdersConsistentLe": { + "id": "QueryGetCustomerOrdersConsistentLe", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersConsistentLe", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersConsistentLe/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetOrderCustomersConsistentLe": { + "id": "QueryGetOrderCustomersConsistentLe", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersConsistentLe", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersConsistentLe/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetCustomerOrdersConsistentGt": { + "id": "QueryGetCustomerOrdersConsistentGt", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersConsistentGt", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersConsistentGt/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetOrderCustomersConsistentGt": { + "id": "QueryGetOrderCustomersConsistentGt", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersConsistentGt", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersConsistentGt/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetCustomerOrdersConsistentGe": { + "id": "QueryGetCustomerOrdersConsistentGe", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersConsistentGe", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersConsistentGe/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetOrderCustomersConsistentGe": { + "id": "QueryGetOrderCustomersConsistentGe", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersConsistentGe", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersConsistentGe/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetCustomerOrdersFilter": { + "id": "QueryGetCustomerOrdersFilter", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersFilter", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersFilter/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetCustomerOrdersBetween": { + "id": "QueryGetCustomerOrdersBetween", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersBetween", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetCustomerOrdersBetween/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetOrderCustomersFilter": { + "id": "QueryGetOrderCustomersFilter", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersFilter", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersFilter/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.DynamoDbDataSource", + "fqn": "@aws-cdk/aws-appsync.Resolver", "version": "0.0.0" } }, - "paymentDs": { - "id": "paymentDs", - "path": "aws-appsync-integ/Api/paymentDs", + "QueryGetOrderCustomersBetween": { + "id": "QueryGetOrderCustomersBetween", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersBetween", "children": { - "ServiceRole": { - "id": "ServiceRole", - "path": "aws-appsync-integ/Api/paymentDs/ServiceRole", - "children": { - "ImportServiceRole": { - "id": "ImportServiceRole", - "path": "aws-appsync-integ/Api/paymentDs/ServiceRole/ImportServiceRole", - "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" - } - }, - "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" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Policy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", - "version": "0.0.0" - } - }, "Resource": { "id": "Resource", - "path": "aws-appsync-integ/Api/paymentDs/Resource", + "path": "aws-appsync-integ/Api/QueryGetOrderCustomersBetween/Resource", "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::DataSource", + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", "aws:cdk:cloudformation:props": { "apiId": { "Fn::GetAtt": [ @@ -2188,135 +2196,127 @@ "ApiId" ] }, - "name": "Payment", - "type": "AMAZON_DYNAMODB", - "dynamoDbConfig": { - "tableName": "PaymentTable", - "awsRegion": { - "Ref": "AWS::Region" - } - }, - "serviceRoleArn": { - "Fn::GetAtt": [ - "ApipaymentDsServiceRole0DAC58D6", - "Arn" - ] - } + "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.CfnDataSource", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } - }, - "QuerygetPaymentResolver": { - "id": "QuerygetPaymentResolver", - "path": "aws-appsync-integ/Api/paymentDs/QuerygetPaymentResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/paymentDs/QuerygetPaymentResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "getPayment", - "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.Resolver", + "version": "0.0.0" + } + }, + "QueryGetPayment": { + "id": "QueryGetPayment", + "path": "aws-appsync-integ/Api/QueryGetPayment", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetPayment/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "getPayment", + "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.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "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)" - } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QueryGetPaymentConsistent": { + "id": "QueryGetPaymentConsistent", + "path": "aws-appsync-integ/Api/QueryGetPaymentConsistent", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/QueryGetPaymentConsistent/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "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)" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } - }, - "MutationsavePaymentResolver": { - "id": "MutationsavePaymentResolver", - "path": "aws-appsync-integ/Api/paymentDs/MutationsavePaymentResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/paymentDs/MutationsavePaymentResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "savePayment", - "typeName": "Mutation", - "dataSourceName": "Payment", - "kind": "UNIT", - "requestMappingTemplate": "\n #set($input = $ctx.args.payment)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", - "responseMappingTemplate": "$util.toJson($ctx.result)" - } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "MutationSavePayment": { + "id": "MutationSavePayment", + "path": "aws-appsync-integ/Api/MutationSavePayment", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/MutationSavePayment/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "savePayment", + "typeName": "Mutation", + "dataSourceName": "Payment", + "kind": "UNIT", + "requestMappingTemplate": "\n #set($input = $ctx.args.payment)\n \n {\n \"version\": \"2017-02-28\",\n \"operation\": \"PutItem\",\n \"key\" : {\n \"id\" : $util.dynamodb.toDynamoDBJson($util.autoId())\n },\n \"attributeValues\": $util.dynamodb.toMapValuesJson($input)\n }", + "responseMappingTemplate": "$util.toJson($ctx.result)" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.DynamoDbDataSource", + "fqn": "@aws-cdk/aws-appsync.Resolver", "version": "0.0.0" } }, @@ -2396,45 +2396,45 @@ "fqn": "@aws-cdk/aws-appsync.CfnDataSource", "version": "0.0.0" } - }, - "MutationdoPostOnAwsResolver": { - "id": "MutationdoPostOnAwsResolver", - "path": "aws-appsync-integ/Api/ds/MutationdoPostOnAwsResolver", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/ds/MutationdoPostOnAwsResolver/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", - "aws:cdk:cloudformation:props": { - "apiId": { - "Fn::GetAtt": [ - "ApiF70053CD", - "ApiId" - ] - }, - "fieldName": "doPostOnAws", - "typeName": "Mutation", - "dataSourceName": "http", - "kind": "UNIT", - "requestMappingTemplate": "{\n \"version\": \"2018-05-29\",\n \"method\": \"POST\",\n # if full path is https://api.xxxxxxxxx.com/posts then resourcePath would be /posts\n \"resourcePath\": \"/path/123\",\n \"params\":{\n \"body\": $util.toJson($ctx.args),\n \"headers\":{\n \"Content-Type\": \"application/json\",\n \"Authorization\": \"$ctx.request.headers.Authorization\"\n }\n }\n }", - "responseMappingTemplate": "\n ## Raise a GraphQL field error in case of a datasource invocation error\n #if($ctx.error)\n $util.error($ctx.error.message, $ctx.error.type)\n #end\n ## if the response status code is not 200, then return an error. Else return the body **\n #if($ctx.result.statusCode == 200)\n ## If response is 200, return the body.\n $ctx.result.body\n #else\n ## If response is not 200, append the response to error block.\n $utils.appendError($ctx.result.body, \"$ctx.result.statusCode\")\n #end\n " - } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.HttpDataSource", + "version": "0.0.0" + } + }, + "MutationDoPostOnAws": { + "id": "MutationDoPostOnAws", + "path": "aws-appsync-integ/Api/MutationDoPostOnAws", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/MutationDoPostOnAws/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", - "version": "0.0.0" - } + "fieldName": "doPostOnAws", + "typeName": "Mutation", + "dataSourceName": "http", + "kind": "UNIT", + "requestMappingTemplate": "{\n \"version\": \"2018-05-29\",\n \"method\": \"POST\",\n # if full path is https://api.xxxxxxxxx.com/posts then resourcePath would be /posts\n \"resourcePath\": \"/path/123\",\n \"params\":{\n \"body\": $util.toJson($ctx.args),\n \"headers\":{\n \"Content-Type\": \"application/json\",\n \"Authorization\": \"$ctx.request.headers.Authorization\"\n }\n }\n }", + "responseMappingTemplate": "\n ## Raise a GraphQL field error in case of a datasource invocation error\n #if($ctx.error)\n $util.error($ctx.error.message, $ctx.error.type)\n #end\n ## if the response status code is not 200, then return an error. Else return the body **\n #if($ctx.result.statusCode == 200)\n ## If response is 200, return the body.\n $ctx.result.body\n #else\n ## If response is not 200, append the response to error block.\n $utils.appendError($ctx.result.body, \"$ctx.result.statusCode\")\n #end\n " } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.HttpDataSource", + "fqn": "@aws-cdk/aws-appsync.Resolver", "version": "0.0.0" } } @@ -2637,7 +2637,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.182" } } }, diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts b/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts index 66e4145d51421..76303ff807297 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts @@ -53,7 +53,7 @@ const api = new GraphqlApi(stack, 'Api', { const noneDS = api.addNoneDataSource('none', { name: 'None' }); -noneDS.createResolver({ +noneDS.createResolver('QuerygetServiceVersion', { typeName: 'Query', fieldName: 'getServiceVersion', requestMappingTemplate: MappingTemplate.fromString(JSON.stringify({ @@ -111,55 +111,55 @@ const customerDS = api.addDynamoDbDataSource('customerDs', customerTable, { name const orderDS = api.addDynamoDbDataSource('orderDs', orderTable, { name: 'Order' }); const paymentDS = api.addDynamoDbDataSource('paymentDs', paymentTable, { name: 'Payment' }); -customerDS.createResolver({ +customerDS.createResolver('QueryGetCustomers', { typeName: 'Query', fieldName: 'getCustomers', requestMappingTemplate: MappingTemplate.dynamoDbScanTable(), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); -customerDS.createResolver({ +customerDS.createResolver('QueryGetCustomer', { typeName: 'Query', fieldName: 'getCustomer', requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id'), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); -customerDS.createResolver({ +customerDS.createResolver('QueryGetCusomtersNotConsistent', { typeName: 'Query', fieldName: 'getCustomersNotConsistent', requestMappingTemplate: MappingTemplate.dynamoDbScanTable(false), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); -customerDS.createResolver({ +customerDS.createResolver('QueryGetCustomerNotConsistent', { typeName: 'Query', fieldName: 'getCustomerNotConsistent', requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id', false), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); -customerDS.createResolver({ +customerDS.createResolver('QueryGetCustomersConsistent', { typeName: 'Query', fieldName: 'getCustomersConsistent', requestMappingTemplate: MappingTemplate.dynamoDbScanTable(true), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); -customerDS.createResolver({ +customerDS.createResolver('QueryGetCustomerConsistent', { typeName: 'Query', fieldName: 'getCustomerConsistent', requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id', true), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); -customerDS.createResolver({ +customerDS.createResolver('MutationAddCustomer', { typeName: 'Mutation', fieldName: 'addCustomer', requestMappingTemplate: MappingTemplate.dynamoDbPutItem(PrimaryKey.partition('id').auto(), Values.projecting('customer')), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); -customerDS.createResolver({ +customerDS.createResolver('MutationSaveCustomer', { typeName: 'Mutation', fieldName: 'saveCustomer', requestMappingTemplate: MappingTemplate.dynamoDbPutItem(PrimaryKey.partition('id').is('id'), Values.projecting('customer')), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); -customerDS.createResolver({ +customerDS.createResolver('MutationSaveCustomerWithFirstOrder', { typeName: 'Mutation', fieldName: 'saveCustomerWithFirstOrder', requestMappingTemplate: MappingTemplate.dynamoDbPutItem( @@ -171,7 +171,7 @@ customerDS.createResolver({ .attribute('referral').is('referral')), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); -customerDS.createResolver({ +customerDS.createResolver('MutationRemoveCustomer', { typeName: 'Mutation', fieldName: 'removeCustomer', requestMappingTemplate: MappingTemplate.dynamoDbDeleteItem('id', 'id'), @@ -186,13 +186,13 @@ const ops = [ { suffix: 'Ge', op: KeyCondition.ge }, ]; for (const { suffix, op } of ops) { - orderDS.createResolver({ + orderDS.createResolver(`QueryGetCustomerOrders${suffix}`, { typeName: 'Query', fieldName: 'getCustomerOrders' + suffix, requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('customer', 'customer')), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); - orderDS.createResolver({ + orderDS.createResolver(`QueryGetOrderCustomers${suffix}`, { typeName: 'Query', fieldName: 'getOrderCustomers' + suffix, requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('order', 'order'), 'orderIndex'), @@ -200,13 +200,13 @@ for (const { suffix, op } of ops) { }); } for (const { suffix, op } of ops) { - orderDS.createResolver({ + orderDS.createResolver(`QueryGetCustomerOrdersNotConsistent${suffix}`, { typeName: 'Query', fieldName: 'getCustomerOrdersNotConsistent' + suffix, requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('customer', 'customer'), undefined, false), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); - orderDS.createResolver({ + orderDS.createResolver(`QueryGetOrderCustomersNotConsistent${suffix}`, { typeName: 'Query', fieldName: 'getOrderCustomersNotConsistent' + suffix, requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('order', 'order'), 'orderIndex', false), @@ -214,41 +214,41 @@ for (const { suffix, op } of ops) { }); } for (const { suffix, op } of ops) { - orderDS.createResolver({ + orderDS.createResolver(`QueryGetCustomerOrdersConsistent${suffix}`, { typeName: 'Query', fieldName: 'getCustomerOrdersConsistent' + suffix, requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('customer', 'customer'), undefined, true), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); - orderDS.createResolver({ + orderDS.createResolver(`QueryGetOrderCustomersConsistent${suffix}`, { typeName: 'Query', fieldName: 'getOrderCustomersConsistent' + suffix, requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('order', 'order'), 'orderIndex', true), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); } -orderDS.createResolver({ +orderDS.createResolver('QueryGetCustomerOrdersFilter', { typeName: 'Query', fieldName: 'getCustomerOrdersFilter', requestMappingTemplate: MappingTemplate.dynamoDbQuery( KeyCondition.eq('customer', 'customer').and(KeyCondition.beginsWith('order', 'order'))), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); -orderDS.createResolver({ +orderDS.createResolver('QueryGetCustomerOrdersBetween', { typeName: 'Query', fieldName: 'getCustomerOrdersBetween', requestMappingTemplate: MappingTemplate.dynamoDbQuery( KeyCondition.eq('customer', 'customer').and(KeyCondition.between('order', 'order1', 'order2'))), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); -orderDS.createResolver({ +orderDS.createResolver('QueryGetOrderCustomersFilter', { typeName: 'Query', fieldName: 'getOrderCustomersFilter', requestMappingTemplate: MappingTemplate.dynamoDbQuery( KeyCondition.eq('order', 'order').and(KeyCondition.beginsWith('customer', 'customer'))), responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); -orderDS.createResolver({ +orderDS.createResolver('QueryGetOrderCustomersBetween', { typeName: 'Query', fieldName: 'getOrderCustomersBetween', requestMappingTemplate: MappingTemplate.dynamoDbQuery( @@ -256,19 +256,19 @@ orderDS.createResolver({ responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); -paymentDS.createResolver({ +paymentDS.createResolver('QueryGetPayment', { typeName: 'Query', fieldName: 'getPayment', requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id'), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); -paymentDS.createResolver({ +paymentDS.createResolver('QueryGetPaymentConsistent', { typeName: 'Query', fieldName: 'getPaymentConsistent', requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id', true), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); -paymentDS.createResolver({ +paymentDS.createResolver('MutationSavePayment', { typeName: 'Mutation', fieldName: 'savePayment', requestMappingTemplate: MappingTemplate.dynamoDbPutItem(PrimaryKey.partition('id').auto(), Values.projecting('payment')), @@ -277,7 +277,7 @@ paymentDS.createResolver({ const httpDS = api.addHttpDataSource('ds', 'https://aws.amazon.com/', { name: 'http' }); -httpDS.createResolver({ +httpDS.createResolver('MutationDoPostOnAws', { typeName: 'Mutation', fieldName: 'doPostOnAws', requestMappingTemplate: MappingTemplate.fromString(`{ From d569c7f79e8445efec4b53d86010e8266d0beeed Mon Sep 17 00:00:00 2001 From: Mitchell Valine Date: Tue, 13 Dec 2022 16:02:49 -0800 Subject: [PATCH 2/2] fix examples --- packages/@aws-cdk/aws-appsync/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index 88f9d1b5546bc..79bad874fdd45 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -79,7 +79,7 @@ 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 -demoDS.createResolver({ +demoDS.createResolver('QueryGetDemosResolver', { typeName: 'Query', fieldName: 'getDemos', requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(), @@ -87,7 +87,7 @@ demoDS.createResolver({ }); // Resolver for the Mutation "addDemo" that puts the item into the DynamoDb table. -demoDS.createResolver({ +demoDS.createResolver('MutationAddDemoResolver', { typeName: 'Mutation', fieldName: 'addDemo', requestMappingTemplate: appsync.MappingTemplate.dynamoDbPutItem( @@ -98,7 +98,7 @@ demoDS.createResolver({ }); //To enable DynamoDB read consistency with the `MappingTemplate`: -demoDS.createResolver({ +demoDS.createResolver('QueryGetDemosConsistentResolver', { typeName: 'Query', fieldName: 'getDemosConsistent', requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(true), @@ -137,7 +137,7 @@ declare const api: appsync.GraphqlApi; const rdsDS = api.addRdsDataSource('rds', cluster, secret, 'demos'); // Set up a resolver for an RDS query. -rdsDS.createResolver({ +rdsDS.createResolver('QueryGetDemosRdsResolver', { typeName: 'Query', fieldName: 'getDemosRds', requestMappingTemplate: appsync.MappingTemplate.fromString(` @@ -154,7 +154,7 @@ rdsDS.createResolver({ }); // Set up a resolver for an RDS mutation. -rdsDS.createResolver({ +rdsDS.createResolver('MutationAddDemoRdsResolver', { typeName: 'Mutation', fieldName: 'addDemoRds', requestMappingTemplate: appsync.MappingTemplate.fromString(` @@ -244,7 +244,7 @@ const httpDs = api.addHttpDataSource( } ); -httpDs.createResolver({ +httpDs.createResolver('MutationCallStepFunctionResolver', { typeName: 'Mutation', fieldName: 'callStepFunction', requestMappingTemplate: appsync.MappingTemplate.fromFile('request.vtl'), @@ -275,7 +275,7 @@ const domain = new opensearch.Domain(this, 'Domain', { declare const api: appsync.GraphqlApi; const ds = api.addOpenSearchDataSource('ds', domain); -ds.createResolver({ +ds.createResolver('QueryGetTestsResolver', { typeName: 'Query', fieldName: 'getTests', requestMappingTemplate: appsync.MappingTemplate.fromString(JSON.stringify({