0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
query/docs/framework/react/reference/interfaces/MutationState.md
Wonsuk Choi e57f8163b1
docs(query-core): add JSDoc across the package and expose it in generated reference docs (#11438)
* docs(query-core): add JSDoc across the package and expose it in generated reference docs

* docs(config.json): add sidebar entries for newly generated query-core reference docs

* docs(query-core): migrate remaining prose from the legacy 'docs/reference' pages into JSDoc

* docs(query-core): remove legacy 'docs/reference' pages superseded by the generated reference

* docs(query-core): regenerate reference docs after merging main

* docs(query-core): document missing default values for MutationOptions, combine, and QueryFilters.type

* fix(query-devtools): drop unnecessary 'query-core' project reference

* docs(query-core): document missing default values and normalize 'Defaults to' spacing

* docs(query-core): fix 'environmentManager' JSDoc example
2026-09-07 18:22:38 +02:00

3 KiB

id title
MutationState MutationState

Defined in: packages/query-core/src/mutation.ts:30

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

TData

TData = unknown

TError

TError = DefaultError

TVariables

TVariables = unknown

TOnMutateResult

TOnMutateResult = unknown

Properties

context

context: TOnMutateResult | undefined;

Defined in: packages/query-core/src/mutation.ts:40

The value returned by onMutate, if defined. Passed to onSuccess, onError and onSettled as the mutation's context.


data

data: TData | undefined;

Defined in: packages/query-core/src/mutation.ts:44

The last successfully resolved data for the mutation.


error

error: TError | null;

Defined in: packages/query-core/src/mutation.ts:49

The error object for the mutation, if the last attempt resulted in an error.

  • Defaults to null.

failureCount

failureCount: number;

Defined in: packages/query-core/src/mutation.ts:53

The number of times the mutation function has failed for the current attempt.


failureReason

failureReason: TError | null;

Defined in: packages/query-core/src/mutation.ts:57

The reason the current attempt failed, as reported by the retryer.


isPaused

isPaused: boolean;

Defined in: packages/query-core/src/mutation.ts:62

Whether the mutation is currently paused (see network mode), or is waiting for another mutation with the same scope to finish.


status

status: MutationStatus;

Defined in: packages/query-core/src/mutation.ts:66

The status of the mutation.


submittedAt

submittedAt: number;

Defined in: packages/query-core/src/mutation.ts:74

The timestamp for when the mutation was submitted.


variables

variables: TVariables | undefined;

Defined in: packages/query-core/src/mutation.ts:70

The variables the mutation was last called with.