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
Im using graphql-codegen and graphql-modules to generate my types. Im wondering why the auto-gen module types are optional and if there is a way to ensure they are required when defined in the schema.
I have added requireRootResolvers: true which resolves the Query resolver but my other resolvers are optional.
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
-
Im using
graphql-codegen
andgraphql-modules
to generate my types. Im wondering why the auto-gen module types are optional and if there is a way to ensure they are required when defined in the schema.I have added
requireRootResolvers: true
which resolves theQuery
resolver but my other resolvers are optional.My codegen config:
user.graphql:
Autogen types (module-types.ts):
Here I add the resolver type as explained in the graphql-modules guide and you can see the
User
resolver is optional.Beta Was this translation helpful? Give feedback.
All reactions