-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to not generate the client, only the types #334
Comments
Hmm. In principle I guess we could do this, but I'm a little worried that depending on genqlient's generated code independently from the client would necessarily open you up to compatibility trouble as the details of the generated code may change over time (compatibly with genqlient, of course, but maybe not with another client). Are you able to say more about why you use a separate client, and what it expects of the generated types? |
I'd like to know more about the compatibility implications before we support this explicitly! It would be nice to know even if we don't, since there may be some gaps in our compatibility statement implied here as well -- we try to support compatibility for most things you might reasonably do with the types after getting them from the client (e.g. roundtripping JSON) but when it comes to using them for another client it's hard to know what quasi-internals (e.g. struct tags) it might depend on. Anyway, if you're able to provide more details, or if others have similar needs and can explain them accordingly, please do post and we can reopen! |
Is your feature request related to a problem? Please describe.
In my project, we use an in-house GraphQL client and only need the types generated without the client code. However, currently, there is no option to generate only the types, which results in unnecessary client code being generated.
Describe the solution you'd like
I would like to have an option in genqlient to generate only the types without the client code. This would allow for more flexibility in the generated code and prevent the generation of unnecessary client code.
Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: