Replies: 2 comments 1 reply
-
I just checked if the "data" in response, then the type of response will be ExecutionResult. |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can use the function helper If you don't plan to use |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
For the code:
return type of
executor()
method isMaybePromise<MaybeAsyncIterable<ExecutionResult<any, any>>>
In my case (not shown in the example) I need to casti result of
executor()
toPromise<ExecutionResult<Query>>
as then I can get aboveresults
without type errors. Otherwise,response
above would be of typeMaybeAsyncIterable
and I am not sure how to typeexecutor
to be able to get what I need above.I couldn't find an example in docs, could you show me what is the proper way to type this?
Beta Was this translation helpful? Give feedback.
All reactions