From 9f7bcb7f28c46dc2fcb9d95d1d6142f13b5768b6 Mon Sep 17 00:00:00 2001 From: ndejaco2 Date: Wed, 25 Oct 2023 11:11:04 -0700 Subject: [PATCH] chore(appsync): Tidy up README for Merged APIs --- packages/aws-cdk-lib/aws-appsync/README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk-lib/aws-appsync/README.md b/packages/aws-cdk-lib/aws-appsync/README.md index ffae1b3f8ac20..aa550e6b067bc 100644 --- a/packages/aws-cdk-lib/aws-appsync/README.md +++ b/packages/aws-cdk-lib/aws-appsync/README.md @@ -377,8 +377,9 @@ const firstApi = new appsync.GraphqlApi(this, 'FirstSourceAPI', { name: 'FirstSourceAPI', definition: appsync.Definition.fromFile(path.join(__dirname, 'appsync.merged-api-1.graphql')), }); + firstApi.addNoneDataSource('FirstSourceDS', { - name: cdk.Lazy.string({ produce(): string { return 'FirstSourceDS'; } }), + name: 'FirstSourceDS', }); // second source API @@ -386,8 +387,9 @@ const secondApi = new appsync.GraphqlApi(this, 'SecondSourceAPI', { name: 'SecondSourceAPI', definition: appsync.Definition.fromFile(path.join(__dirname, 'appsync.merged-api-2.graphql')), }); + secondApi.addNoneDataSource('SecondSourceDS', { - name: cdk.Lazy.string({ produce(): string { return 'SecondSourceDS'; } }), + name: 'SecondSourceDS', }); // Merged API @@ -399,6 +401,10 @@ const mergedApi = new appsync.GraphqlApi(this, 'MergedAPI', { sourceApi: firstApi, mergeType: appsync.MergeType.MANUAL_MERGE, }, + { + sourceApi: secondApi, + mergeType: appsync.MergeType.AUTO_MERGE, + } ], }), });