0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-18 19:33:22 +00:00
query/docs/framework/react/reference/interfaces/MutateOptions.md
Wonsuk Choi f38e6271b4
chore(*): update '@tanstack/typedoc-config' to v0.3.5 (#12035)
* chore(scripts/generate-docs): read type alias bodies whose type parameters have defaults

* chore(*): update '@tanstack/typedoc-config' to v0.3.5
2026-10-17 11:14:03 +09:00

1.7 KiB

id title
MutateOptions MutateOptions

Defined in: packages/query-core/src/types.ts:2012

The callbacks that can be passed to mutate for a single call. They run after the callbacks of the mutation options.

Type Parameters

TData

TData = unknown

TError

TError = DefaultError

TVariables

TVariables = void

TOnMutateResult

TOnMutateResult = unknown

Properties

Property Type Description
onError? (error: TError, variables: TVariables, onMutateResult: TOnMutateResult | undefined, context: MutationFunctionContext) => void Called when the mutation of this call fails, after the onError of the mutation options.
onSettled? (data: TData | undefined, error: TError | null, variables: TVariables, onMutateResult: TOnMutateResult | undefined, context: MutationFunctionContext) => void Called when the mutation of this call succeeds or fails, after the onSettled of the mutation options.
onSuccess? (data: TData, variables: TVariables, onMutateResult: TOnMutateResult | undefined, context: MutationFunctionContext) => void Called when the mutation of this call succeeds, after the onSuccess of the mutation options.