TanStack
API Reference

MutationFunctionContext

ts
type MutationFunctionContext = object;

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

The object passed to mutationFn and the mutation callbacks: the QueryClient, the mutation's meta, and its mutationKey.

Properties

PropertyTypeDescription
clientQueryClientThe QueryClient the mutation runs in.
metaMutationMeta | undefinedThe meta of the mutation options.
mutationKey?MutationKeyThe mutationKey of the mutation options, if set.