Replies: 1 comment
-
|
https://tanstack.com/query/v5/docs/framework/react/typescript#registering-a-global-error |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
In this situation, the type of
datais inferred asCustomResponse, while the type oferroris not inferred asCustomError.I only want to specify the response type and error type for the API fetcher function part, and I don't want to enter any generics for the query call part.
I just want to make
dataanderrortypes of inference just by passing the API fetcher function toqueryFnormutationFn.Is there a way to do this? Or is the
TErrortype designed to be impossible to infer withqueryFnormutationFn?Thx :)
Beta Was this translation helpful? Give feedback.
All reactions