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
Using the generated Resolvers type, typescript has an error for my Event.user Subresolver.
The types require Events.user to return the profile filed. In my opinion that makes no sense because the Profile is already resolved by User.profile subresolver.
Is it possible to make nested Objects in Schema optional in resolver return types?
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
-
graphql-codegen is a huge help for generating up-to-date types in our project.
But I came across something, that I cant solve with the docs.
Lets say I have a user schema like this:
The field profile is resolved by a subresolver User.profile.
Event resolvers are defined in a different resolver file that users and look like this:
Using the generated
Resolvers
type, typescript has an error for my Event.user Subresolver.The types require Events.user to return the profile filed. In my opinion that makes no sense because the Profile is already resolved by User.profile subresolver.
Is it possible to make nested Objects in Schema optional in resolver return types?
Beta Was this translation helpful? Give feedback.
All reactions