Replies: 1 comment 3 replies
-
onMutate is async, so it can return a failed / rejected promise, so the return part is never reached if that happens. |
Beta Was this translation helpful? Give feedback.
3 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.
-
I apologise if this has previously been discussed, there are a lot of search results for "context" so I may have missed something.
The type of the useQuery callbacks (
onSuccess
/onError
/onSettled
) havecontext: TContext | undefined
.If my
onMutate
function returns a typeT
, is that not guaranteed to be passed to thecontext
parameter of the callbacks?Beta Was this translation helpful? Give feedback.
All reactions