Skip to content
0

katanakit-js / MutationState

Interface: MutationState<TData, TError, TVariables, TOnMutateResult> ​

Defined in: node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:705

The raw state stored on a Mutation instance. This is the underlying state that observer results (e.g. MutationObserverResult) are derived from.

Extended by ​

Type Parameters ​

Type ParameterDefault type
TDataunknown
TErrorDefaultError
TVariablesunknown
TOnMutateResultunknown

Properties ​

PropertyTypeDescriptionDefined in
contextTOnMutateResult | undefinedThe value returned by onMutate, if defined. Passed to onSuccess, onError and onSettled as the mutation's context.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:710
dataTData | undefinedThe last successfully resolved data for the mutation.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:714
errorTError | nullThe error object for the mutation, if the last attempt resulted in an error. - Defaults to null.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:719
failureCountnumberThe number of times the mutation function has failed for the current attempt.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:723
failureReasonTError | nullThe reason the current attempt failed, as reported by the retryer.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:727
isPausedbooleanWhether the mutation is currently paused (see network mode), or is waiting for another mutation with the same scope to finish.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:732
status"error" | "success" | "pending" | "idle"The status of the mutation.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:736
submittedAtnumberThe timestamp for when the mutation was submitted.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:744
variablesTVariables | undefinedThe variables the mutation was last called with.node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:740

Released under the MIT License.