sid88in / serverless-appsync-plugin

serverless plugin for appsync
MIT License
951 stars 189 forks source link

Feature Request: Merged Api Support #605

Open SethO opened 1 year ago

SethO commented 1 year ago

I wanted to start a discussion about how this project evolves given the newly available AppSync Merged APIs.

One approach could be to use one API definition per source API and one for the merged API. The last would be a convenient "wrapper" over the CloudFormation needed to set one up.

Another approach could be something closer to what v1 of this plugin supported where we define multiple APIs in the same definition and then include the merged API to stitch it all together.

I look forward to the conversation.

bboure commented 1 year ago

Thank you @SethO

This is something I want to support. I still need to figure out how this all works with CloudFormation but it seems like two key parameters are ApiType and MergedApiExecutionRoleArn

Another approach could be something closer to what v1 of this plugin supported where we define multiple APIs in the same definition and then include the merged API to stitch it all together.

My first impression is that we should probably not do that. In theory, the merge feature is meant to be used when several teams work together. This means that each team would own and maintain their own stack (i.e. their own servelress.yml file).

I will try to find some time to investigate all this.

SethO commented 1 year ago

I've got a working GitHub example of the CloudFormation here. There are mistakes in the current AWS CFN documentation that I'll highlight in an upcoming blog article on the subject (with links to this repo, I might add). I'll post a link in this thread when it's published.

SethO commented 1 year ago

Here is the blog post.