AWS AppSync Merged API over two source APIs backed by Amazon DynamoDB

AWS AppSync Merged API → AWS AppSync Orders API → AWS AppSync Customers API → Amazon DynamoDB Orders table → Amazon DynamoDB Customers table

An AWS AppSync Merged API combines two source GraphQL APIs, each backed by its own Amazon DynamoDB table, into one IAM-protected endpoint that merges automatically.

Two AWS AppSync source GraphQL APIs, an Orders API and a Customers API, each read from their own Amazon DynamoDB table through an APPSYNC_JS resolver. An AWS AppSync Merged API associates both with AUTO_MERGE and exposes one AWS_IAM endpoint.
The Customers schema adds an Order.customer field to the Order type owned by the Orders API, so one GraphQL query returns an order and its customer from two tables.
The merge role can only reach these two source APIs and their associations. No AWS Lambda function sits in the request path.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/appsync-merged-api/typescript/cdk

Deploy

npm installnpx cdk bootstrapnpx cdk deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

npx cdk destroy

Created by:

Nithin Chandran R

Nithin Chandran R

Technical Account Manager at AWS