Skip to content

Commit

Permalink
chore(appsync): Tidy up README for Merged APIs (#27679)
Browse files Browse the repository at this point in the history
* This change just updates the README to remove an unnecessary use of lazy and show the second api being associated with AUTO_MERGE mode which had been removed by mistake.
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
ndejaco2 committed Oct 25, 2023
1 parent afb3e67 commit d5fe923
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/aws-cdk-lib/aws-appsync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,18 +377,12 @@ 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'; } }),
});

// second source API
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'; } }),
});

// Merged API
const mergedApi = new appsync.GraphqlApi(this, 'MergedAPI', {
Expand All @@ -399,6 +393,10 @@ const mergedApi = new appsync.GraphqlApi(this, 'MergedAPI', {
sourceApi: firstApi,
mergeType: appsync.MergeType.MANUAL_MERGE,
},
{
sourceApi: secondApi,
mergeType: appsync.MergeType.AUTO_MERGE,
}
],
}),
});
Expand Down

0 comments on commit d5fe923

Please sign in to comment.