Add Pages GraphQL refactoring. #29658
Unanswered
omar-shahid
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to refactor my GraphQL queries, and couldn't find any resource on this topic. People are saying it is not possible (https://stackoverflow.com/a/51690033/9795654). I don't know if the statement above is still valid, as I couldn't find any information about this.
I am basically trying to do this for GraphQL CodeGen to generate the TypeScript types for the queries. Please let me know how to do this. I tried to import a GraphQL file using a gatsby plugin(gatsby-plugin-graphql-loader) and inject query using string interpolation, but it is not working.
GraphQL File:
Gatsby Page:
Please let me know how to achieve this.
Beta Was this translation helpful? Give feedback.
All reactions