Skip to main content
Version: 11.x

Interface: UseTRPCMutationOptions<TInput, TError, TOutput, TContext>

Extends

Type Parameters

Type ParameterDefault type
TInput-
TError-
TOutput-
TContextunknown

Properties

gcTime?

optional gcTime: number

Inherited from

UseMutationOptions.gcTime

Defined in

node_modules/.pnpm/@tanstack+query-core@5.62.8/node_modules/@tanstack/query-core/build/legacy/hydration-DiTAi-4H.d.ts:1134


meta?

optional meta: Record<string, unknown>

Inherited from

UseMutationOptions.meta

Defined in

node_modules/.pnpm/@tanstack+query-core@5.62.8/node_modules/@tanstack/query-core/build/legacy/hydration-DiTAi-4H.d.ts:1136


mutationFn?

optional mutationFn: MutationFunction<TOutput, TInput>

Inherited from

UseMutationOptions.mutationFn

Defined in

node_modules/.pnpm/@tanstack+query-core@5.62.8/node_modules/@tanstack/query-core/build/legacy/hydration-DiTAi-4H.d.ts:1125


mutationKey?

optional mutationKey: MutationKey

Inherited from

UseMutationOptions.mutationKey

Defined in

node_modules/.pnpm/@tanstack+query-core@5.62.8/node_modules/@tanstack/query-core/build/legacy/hydration-DiTAi-4H.d.ts:1126


networkMode?

optional networkMode: NetworkMode

Inherited from

UseMutationOptions.networkMode

Defined in

node_modules/.pnpm/@tanstack+query-core@5.62.8/node_modules/@tanstack/query-core/build/legacy/hydration-DiTAi-4H.d.ts:1133


onError()?

optional onError: (error, variables, context) => unknown

Parameters

ParameterType
errorTError
variablesTInput
contextundefined | TContext

Returns

unknown

Inherited from

UseMutationOptions.onError

Defined in

node_modules/.pnpm/@tanstack+query-core@5.62.8/node_modules/@tanstack/query-core/build/legacy/hydration-DiTAi-4H.d.ts:1129


onMutate()?

optional onMutate: (variables) => undefined | TContext | Promise<undefined | TContext>

Parameters

ParameterType
variablesTInput

Returns

undefined | TContext | Promise<undefined | TContext>

Inherited from

UseMutationOptions.onMutate

Defined in

node_modules/.pnpm/@tanstack+query-core@5.62.8/node_modules/@tanstack/query-core/build/legacy/hydration-DiTAi-4H.d.ts:1127


onSettled()?

optional onSettled: (data, error, variables, context) => unknown

Parameters

ParameterType
dataundefined | TOutput
errornull | TError
variablesTInput
contextundefined | TContext

Returns

unknown

Inherited from

UseMutationOptions.onSettled

Defined in

node_modules/.pnpm/@tanstack+query-core@5.62.8/node_modules/@tanstack/query-core/build/legacy/hydration-DiTAi-4H.d.ts:1130


onSuccess()?

optional onSuccess: (data, variables, context) => unknown

Parameters

ParameterType
dataTOutput
variablesTInput
contextTContext

Returns

unknown

Inherited from

UseMutationOptions.onSuccess

Defined in

node_modules/.pnpm/@tanstack+query-core@5.62.8/node_modules/@tanstack/query-core/build/legacy/hydration-DiTAi-4H.d.ts:1128


retry?

optional retry: RetryValue<TError>

Inherited from

UseMutationOptions.retry

Defined in

node_modules/.pnpm/@tanstack+query-core@5.62.8/node_modules/@tanstack/query-core/build/legacy/hydration-DiTAi-4H.d.ts:1131


retryDelay?

optional retryDelay: RetryDelayValue<TError>

Inherited from

UseMutationOptions.retryDelay

Defined in

node_modules/.pnpm/@tanstack+query-core@5.62.8/node_modules/@tanstack/query-core/build/legacy/hydration-DiTAi-4H.d.ts:1132


scope?

optional scope: MutationScope

Inherited from

UseMutationOptions.scope

Defined in

node_modules/.pnpm/@tanstack+query-core@5.62.8/node_modules/@tanstack/query-core/build/legacy/hydration-DiTAi-4H.d.ts:1137


throwOnError?

optional throwOnError: boolean | (error) => boolean

Inherited from

UseMutationOptions.throwOnError

Defined in

node_modules/.pnpm/@tanstack+query-core@5.62.8/node_modules/@tanstack/query-core/build/legacy/hydration-DiTAi-4H.d.ts:1140


trpc?

optional trpc: TRPCReactRequestOptions

tRPC-related options

Inherited from

TRPCUseQueryBaseOptions.trpc

Defined in

packages/react-query/src/shared/hooks/types.ts:57