[{"data":1,"prerenderedAt":78},["ShallowReactive",2],{"pattern-appsync-merged-api-typescript-cdk":3,"pattern-group-appsync-merged-api-typescript-cdk":6},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":6,"introBox":24,"language":30,"level":31,"meta":32,"patternArch":33,"patternGroup":61,"patternGroupLabel":6,"resources":62,"stem":73,"testing":74,"videoId":6,"__hash__":77},"patterns\u002Fpatterns\u002Fappsync-merged-api-typescript-cdk.json","AWS AppSync Merged API over two source APIs backed by Amazon DynamoDB",null,{"text":8},[9],"\u003Ccode>npx cdk destroy\u003C\u002Fcode>",[11],"content\u002Fcontributors\u002Fnithin-chandran-r.json",{"text":13},[14,15,16],"\u003Ccode>npm install\u003C\u002Fcode>","\u003Ccode>npx cdk bootstrap\u003C\u002Fcode>","\u003Ccode>npx cdk deploy\u003C\u002Fcode>","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.","json","AWS CDK",{"template":21},{"patternPath":22,"templateFile":23},"appsync-merged-api\u002Ftypescript\u002Fcdk","lib\u002Fappsync-merged-api-stack.ts",{"headline":25,"text":26},"How it works",[27,28,29],"Two AWS AppSync source GraphQL APIs, an Orders API and a Customers API, each read from their own Amazon DynamoDB table through an \u003Ccode>APPSYNC_JS\u003C\u002Fcode> resolver. An AWS AppSync Merged API associates both with \u003Ccode>AUTO_MERGE\u003C\u002Fcode> and exposes one \u003Ccode>AWS_IAM\u003C\u002Fcode> endpoint.","The Customers schema adds an \u003Ccode>Order.customer\u003C\u002Fcode> field to the \u003Ccode>Order\u003C\u002Fcode> 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.","TypeScript","300",{},{"icon1":34,"icon2":39,"icon3":43,"icon4":46,"icon5":50,"line1":52,"line2":55,"line3":57,"line4":59},{"x":35,"y":36,"service":37,"label":38},12,43,"appsync","AWS AppSync\nMerged API",{"x":40,"y":41,"service":37,"label":42},50,20,"AWS AppSync\nOrders API",{"x":40,"y":44,"service":37,"label":45},66,"AWS AppSync\nCustomers API",{"x":47,"y":41,"service":48,"label":49},84,"dynamodb","Amazon DynamoDB\nOrders table",{"x":47,"y":44,"service":48,"label":51},"Amazon DynamoDB\nCustomers table",{"from":53,"to":54},"icon1","icon2",{"from":53,"to":56},"icon3",{"from":54,"to":58},"icon4",{"from":56,"to":60},"icon5","appsync-merged-api",{"bullets":63},[64,67,70],{"text":65,"link":66},"Merging APIs in AWS AppSync","https:\u002F\u002Fdocs.aws.amazon.com\u002Fappsync\u002Flatest\u002Fdevguide\u002Fmerged-api.html",{"text":68,"link":69},"AWS AppSync Definition.fromSourceApis in the AWS CDK API reference","https:\u002F\u002Fdocs.aws.amazon.com\u002Fcdk\u002Fapi\u002Fv2\u002Fdocs\u002Faws-cdk-lib.aws_appsync.Definition.html",{"text":71,"link":72},"Attaching a data source in AWS AppSync","https:\u002F\u002Fdocs.aws.amazon.com\u002Fappsync\u002Flatest\u002Fdevguide\u002Fattaching-a-data-source.html","patterns\u002Fappsync-merged-api-typescript-cdk",{"text":75},[76],"See the GitHub repo for detailed testing instructions.","2_Kgi8hVfn7NB-hbdD8i92iG_FVTe4acYnhcPjwVKUk",1794652450459]