-
Notifications
You must be signed in to change notification settings - Fork 114
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
Multiple generated files #185
Comments
Thanks for the suggestion! Can you give a little more information about the lines along which we'd split the generated file, and what benefits you're looking for from that split? I can think of a few different things you might be looking for, which could look very different:
Thanks in advance for any thoughts you (or other folks interested in this) can fill in; I hope with a better understanding of your use cases we can find a way to help! |
I have a need for this (if you don't mind me jumping in). The reason is I want to have my types exist in a separate package and use those types everywhere. My use case - I am leveraging Hasura, pulling the schema and then running the code gen. I have one "backend" and multiple "frontends" (cli/sdk/ui) and I want the "frontends" and "backends" to rely on the same types in order to force them to agree when the frontend calls the backend. |
Thanks for the additional information! What do you mean by "have my types in a separate package" -- separate from what? Just from the query-helpers? If you have a Or, would it be possible to just have all the queries be shared, or have genqlient generate queries into several places? It seems to me that with genqlient you wouldn't need to share the types to ensure they're the same; as long as they're generated from the same schema they'll all match for the most part, but maybe I don't fully understand your use case. |
@benjaminjkraft, hi! Sorry for the delay.
Yes, I have multiple disjoint schemas for which I'd like to split generated code into multiple packages. I think that genqlient config can describe multiple schemas by just repeating existing |
Is your feature request related to a problem? Please describe.
I'd like to generate independent files for different schemas/operations so that all the generated code won't end up in a single file.
Describe the solution you'd like
Let the user specify multiple paths in the
generated
section.Describe alternatives you've considered
Multiple
genqlient.yaml
configs?..Additional context
Not needed.
The text was updated successfully, but these errors were encountered: