Explains codegen command for externally generated APIs
After working on a CDK project, I wanted to more fully understand how to run the amplify add codegen command for a schema.graphql file deployed with the CDK so that the queries, mutations, and subscriptions can be generated even though the API was not built or deployed with the Amplify CLI.
This PR adds some extra clarity about the need to initialize an Amplify project to then run the amplify add codegen command and about what adding in the —apiId flag does to help with importing the API into the stack so it can generate the files and add it to the Amplify resource stack locally.
Description of changes:
Related GitHub issue #, if available:
Instructions
If this PR should not be merged upon approval for any reason, please submit as a DRAFT
Which product(s) are affected by this PR (if applicable)?
- [X] amplify-cli
- [ ] amplify-ui
- [ ] amplify-studio
- [ ] amplify-hosting
- [ ] amplify-libraries
Which platform(s) are affected by this PR (if applicable)?
- [X] JS
- [ ] iOS
- [ ] Android
- [ ] Flutter
- [ ] React Native
Please add the product(s)/platform(s) affected to the PR title
Checks
-
[X] Does this PR conform to the styleguide?
-
[ ] Does this PR include filetypes other than markdown or images? Please add or update unit tests accordingly.
-
[ ] Are any files being deleted with this PR? If so, have the needed redirects been created?
-
[X] Are all links in MDX files using the MDX link syntax rather than HTML link syntax?
ref: MDX:[link](https://link.com)HTML:<a href="https://link.com">link</a>
When this PR is ready to merge, please check the box below
- [X] Ready to merge
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Hey @BrianHHough :wave: thanks for taking the time to file this and apologies for the delay! Would you mind resolving the conflicts?