Is it possible to generate a file per type instead of one mega-file with everything? #5077
Unanswered
JaffParker
asked this question in
Ideas
Replies: 2 comments 2 replies
-
Thank you @JaffParker. This is very much my question also. May I add also: is there a way to transform individual GraphQL schema files to some other format without actually having to specify them one by one in the codegen config file as outputs? The problem is that a custom plugin can only return one string. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Just thought this discussion might also be relevant. |
Beta Was this translation helpful? Give feedback.
2 replies
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.
-
Hi. Been using and loving this. But like many others, I'm concerned with the fact that my app now has to drag a massive file with it on every page load, it's not ideal. I tried the near-operation-file-preset, but it still generates a mega file and references it from each operation.
The devs mentioned that plugin authors now can generate multiple files, but after going through the list of plugins, I didn't find anything that would do this yet. What I have in mind is basically creating a file for each object type, input type and enum, then one for scalars. That way each operation would only import the code relevant to it, nothing extra.
I haven't looked at plugin authoring yet, whether I'd be able or not to create one. If someone has, what do you think? Can you think of any drawbacks with such approach?
Beta Was this translation helpful? Give feedback.
All reactions