Skip to content
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

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

Open
CryptoGraffe opened this issue Feb 26, 2023 · 3 comments
Open

Comments

@CryptoGraffe
Copy link

CryptoGraffe commented Feb 26, 2023

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
Copy link
Collaborator

aexol commented Feb 28, 2023

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

@CryptoGraffe
Copy link
Author

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
Copy link
Author

@aexol Any thoughts on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants