You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
Hello!
Using the gatsby-plugin-graphql-codegen plugin, is it possible to create separate files for types and queries?
Let's say I'd like all the types to be in a graphql-types.ts and graphql-queries.ts. In previous non gatsby projects using the codegen app standalone, I've done this using generates config. Something like this:
Hi @jregistr! Thank you for your interest in this plugin.
It's not possible with the plugin as is, since we're not 1:1 map with codegen cli. For your use case, it might be simpler to write a script that utilize @graphql-codegen/cli directly, as shown here.
I'm thinking about using the cli as well, but haven't really make a decision yet.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello!
Using the
gatsby-plugin-graphql-codegen
plugin, is it possible to create separate files for types and queries?Let's say I'd like all the types to be in a graphql-types.ts and graphql-queries.ts. In previous non gatsby projects using the codegen app standalone, I've done this using generates config. Something like this:
I've tried adding an additionalSchema gatsby plugin option only pointing it to the tsx files. This doesn't seem to work.
Is this possible w/ the plugin as is?
The text was updated successfully, but these errors were encountered: