Replies: 1 comment
-
The first one that gets called is the cache-level one defined on the The last thing that gets called is the “observer-level” callback on
no, it doesn’t change. |
Beta Was this translation helpful? Give feedback.
-
The first one that gets called is the cache-level one defined on the The last thing that gets called is the “observer-level” callback on
no, it doesn’t change. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say I define three onError handlers:
When creating the queryClient:
Afterwards, when defining cusotm hooks which call mutations:
And finally, where it's used:
Let's say the error fails. Which onError do get called?
From what I understood, the hook-definition one, and the one directly called with
mutate
both get called. But what about the global one, does it still trigger?And does this behaviour change when using
mutateAsync
, as that one throws errors?All help is appreciated!
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions