dotansimha / dotansimha/graphql-code-generator

Option to inline enums and input + variable types in operations (+urql?)

Open
#10,387 5 comments 0 reactions 1 assignee Claimed by @eddeee888 View on GitHub
Dominant language
TypeScript
Stars
11.3k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
23

Description

### Is your feature request related to a problem? Please describe.

We have a pretty huge schema, and TypeScript LSP performance is a major pain point for us. I'm looking into using `near-operation-file-preset` to split up the generated types in order to speed things up, but I've hit a wall because as soon as a generated colocated file imports anything from the giant schema types file, we lose the benefits of splitting things up.

### Describe the solution you'd like

When I was using Relay in previous projects, any schema types were also included in the co-located files, i.e there was never a single massive file that contained types representing the entire schema (operations-only or otherwise). I'm happy to take the hit on duplicate enum and input+variable definitions if it means I can avoid importing these enormous modules.

### Describe alternatives you've considered

I've looked at whether it's possible to achieve this with an additional plugin, or wrapping an existing one, but no luck so far.

### Any additional important details?

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.