Skip to content

Possibility of accessing mutation's observers (MutationCache onError) #6671

Answered by TkDodo
janowskipio asked this question in Ideas
Discussion options

You must be logged in to vote

However, we would still like to not fire global/default onError specified in MutationCache when someone defines onError on the mutate

The problem here is that even if mutate defines onError, there's no guarantee that it will actually run because the callbacks are scoped to the observer, which can unmount before the mutation finishes. That's why I'd see these two layers as "additional" rather than "we don't need the global one because mutate already defines it"...

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@janowskipio
Comment options

@TkDodo
Comment options

Answer selected by janowskipio
@janowskipio
Comment options

@sKopheK
Comment options

@janowskipio
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants