Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

MutationOptions.md

38 lines759 Bytes

Defined in: types.ts:241

The options accepted by useMutation and mutationOptions.

Extends

  • OmitKeyof<MutationObserverOptions<TData, TError, TVariables, TOnMutateResult>, "_defaulted">

Type Parameters

TData

TData = unknown

The type your mutationFn resolves to.

TError

TError = DefaultError

The type of errors your mutationFn may throw.

TVariables

TVariables = void

The type of the variables your mutationFn accepts.

TOnMutateResult

TOnMutateResult = unknown

The type returned by onMutate, passed on to onSuccess/onError/onSettled.