Solve inconsistencies between "paused" mutations and "paused" queries #6760
Unanswered
crutchcorn
asked this question in
Ideas
Replies: 1 comment 1 reply
-
Yeah, queries and mutations have diverged a bit. There is no What we could do is add an
|
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.
-
While working on adding in a banner to display offline metadata to our users, I noticed that there was no easy way to fetch the
paused
mutations count, even while using theuseMutationState
hook.This seems to be due to the fact that mutations do not have a
paused
status enum, despite having aisPaused
state property.This seems to not align well with how queries are handled. It might be nice to have a
paused
status enum on mutations as they are on queries.References to
"paused"
mutations:https://github.com/TanStack/query/blob/main/packages/query-core/src/mutation.ts#L35
https://github.com/TanStack/query/blob/main/packages/query-core/src/mutation.ts#L63-L65
Where I'd want to add support for
paused
status type:isPaused
derived state, like there is foruseQuery
status: 'paused'
to the...state
spreadQueryStatus
is broken intoFetchStatus
as well. Maybe we want to do the same for mutations?Beta Was this translation helpful? Give feedback.
All reactions