MCPcopy Create free account
hub / github.com/TanStack/query / getMutationStatusRank

Function getMutationStatusRank

packages/query-devtools/src/utils.tsx:125–132  ·  view source on GitHub ↗
(m: Mutation)

Source from the content-addressed store, hash-verified

123type MutationSortFn = (a: Mutation, b: Mutation) => number
124
125const getMutationStatusRank = (m: Mutation) =>
126 m.state.isPaused
127 ? 0
128 : m.state.status === 'error'
129 ? 2
130 : m.state.status === 'pending'
131 ? 1
132 : 3
133
134const mutationDateSort: MutationSortFn = (a, b) =>
135 a.state.submittedAt < b.state.submittedAt ? 1 : -1

Callers 1

mutationStatusSortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected