Properly typing top level resolver with separately resolved fields #8851
Unanswered
probablykabari
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Given the following schema:
If I'm writing this resolver in typescript all the fields in the generated resolvers (typescript-resolvers plugin) are typed to their scalar values. How would accomplish the following:
I get a type error on the return value of that function because
remoteValueis typed asMaybe<Array<Scalars['String']>>and therefore I can't return a resolver function with this value. This is perfectly fine in graphql itself, I just can't figure out which type I need.Is this a setting I'm not seeing in typescript-resolvers? Do I need to manually type this function using the exported
Resolverstype? Something else?Beta Was this translation helpful? Give feedback.
All reactions