Closed
Description
I have redefined the Kind
and OperationTypeNode
enums in Graffle because they do not seem to tree shake well. You can see the code and bundle visualization in this PR. With my approach already just those two enums are reduced by over 4kb in Graffle.
Obviously it would be nice if graphql
was already fully tree shake optimized from the start. Is there an appetite to adjust how the enums are defined in graphql
? I think my approach would be a breaking change at the type level because TypeScript enum types, even if using string constants at runtime, are not equivalent to them at the type level.
Feel free to close this issue if there's zero chance of change on the graphql
package side of course. Convesely, happy to help out on this issue.
Metadata
Metadata
Assignees
Labels
No labels