graphql-zeus icon indicating copy to clipboard operation
graphql-zeus copied to clipboard

Any way to breakup the generated typescript into multiple files?

Open CryptoGraffe opened this issue 1 year ago • 3 comments

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?

CryptoGraffe avatar Feb 26 '23 05:02 CryptoGraffe

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

aexol avatar Feb 28 '23 11:02 aexol

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 avatar Nov 07 '23 18:11 CryptoGraffe

@aexol Any thoughts on this?

CryptoGraffe avatar Jan 22 '24 17:01 CryptoGraffe