You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moving some client-side code over from Apollo tools, I was having issues with duplicated types for documents like
mutationDoSomething {
doSomething {
ok
}
}
because GCG was creating a complete DoSomethingMutation type for the field in the schema, and another DoSomethingMutation type for this particular document.
The solution is to set onlyOperationTypes: true, so it doesn't emit the former. But I only found that out through dumb luck, because the documentation says:
This will cause the generator to emit types for operations only (basically only enums and scalars)
What does that mean? What do enums/scalars have to do with this setting?
I'd open a PR to put something more descriptive here, but want to make sure this setting does what I think it does.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Moving some client-side code over from Apollo tools, I was having issues with duplicated types for documents like
because GCG was creating a complete
DoSomethingMutation
type for the field in the schema, and anotherDoSomethingMutation
type for this particular document.The solution is to set
onlyOperationTypes: true
, so it doesn't emit the former. But I only found that out through dumb luck, because the documentation says:What does that mean? What do enums/scalars have to do with this setting?
I'd open a PR to put something more descriptive here, but want to make sure this setting does what I think it does.
Beta Was this translation helpful? Give feedback.
All reactions