Skip to content

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

@AndrewIngram

Description

@AndrewIngram

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions