graphql-editor / graphql-zeus

GraphQL client and GraphQL code generator with GraphQL autocomplete library generation ⚡⚡⚡ for browser,nodejs and react native ( apollo compatible )
https://graphqleditor.com/docs/zeus
MIT License
1.95k stars 106 forks source link

Any way to breakup the generated typescript into multiple files? #363

Open CryptoGraffe opened 1 year ago

CryptoGraffe commented 1 year ago

We use zeus to generate typescript bindings for a graphql endpoint that has a lot of types and fields. Our generated files are huge. They are often a source of repo conflict and reviewing diffs is challenging. Is there any way to get zeus to generate a file per type or something like that? Has anyone forked and worked on that?

aexol commented 1 year ago

This is interesting. We can break internals and generated types of course, just tell what you need exactly

CryptoGraffe commented 1 year ago

Following up here! Our generated index.ts is 2.8MB. Here it is for reference.

https://github.com/coordinape/coordinape/blob/main/api-lib/gql/__generated__/zeus/index.ts

Be careful opening in github, it might crash your browser. It gives IDEs a heck of a time and also any time there is changes the diffs are huge and we have conficts. What I would love is if each table/resource was broken up into its own file so that we have much smaller index/const files to deal with. Any hope here?

CryptoGraffe commented 10 months ago

@aexol Any thoughts on this?