@dotansimha copying my comment from that thread in here. I'm not sure if this ticket is meant to track improvements related to my comment, so I wanted to flag:
@dotansimha to pile on to the use case here, for large federated graphs, my total file size generated is nearing 2MB. The number of exports and types seems like it puts an unnecessary strain on the TS compiler and IDE.
This combination:
preResolveTypes: true
onlyOperationTypes: true
is useful and has significantly reduced my file size, but it's still generating all enum and input types in the graph, rather than just the ones I'm using in my queries.
Copying my issue use-case: We are connecting to an GraphQL API which has a lot of endpoints so the generated types declaration file is huge (10k lines long). It would be great if it would only create types for used types in the .graphql files and additionally through an option which I also want to force adding.
Same issue I use postgraphile and codgen to generate an api for our database, but the file types are huge, massively slows down IDE.
Most helpful comment
Copying my issue use-case: We are connecting to an GraphQL API which has a lot of endpoints so the generated types declaration file is huge (10k lines long). It would be great if it would only create types for used types in the .graphql files and additionally through an option which I also want to force adding.