amplify-codegen
amplify-codegen copied to clipboard
Unable to generate operations.graphql
Before opening, please confirm:
- [X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- [X] I have searched for duplicate or closed issues.
- [X] I have read the guide for submitting bug reports.
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
20.9.0
Amplify CLI Version
12.11.1
What operating system are you using?
Mac
Amplify Codegen Command
other codegen <subcommand> (please mention in the issue)
Describe the bug
I would like to efficiently generate RTK Query hooks for my Amplify application using this tool.
I have not been able to figure out how to generate the code that belongs in the operations.graphql input. In other word, the files that are generated with amplify codegen statements but without the Typescript wrapped around.
Maybe I am missing a simple command, but if not it would be really helpful to have this as a codegen statement...
Expected behavior
The output I expect is the useGetAccountQuery, but properly typed with the queries definition found in graphql/queries.ts, but without the typescript wrapping it.
I would like to have an option to access these statements in their graphql syntax within my codebase via this codegen package.
Reproduction steps
- Install this lib
- Try to get a single
graphqlfile with all of the operations the schema offers.