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.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:1125


meta?

optional meta: Record<string, unknown>

Inherited from

UseMutationOptions.meta

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:1127


mutationFn?

optional mutationFn: MutationFunction<TOutput, TInput>

Inherited from

UseMutationOptions.mutationFn

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:1116


mutationKey?

optional mutationKey: MutationKey

Inherited from

UseMutationOptions.mutationKey

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:1117


networkMode?

optional networkMode: NetworkMode

Inherited from

UseMutationOptions.networkMode

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:1124


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.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:1120


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.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:1118


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.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:1121


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.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:1119


retry?

optional retry: RetryValue<TError>

Inherited from

UseMutationOptions.retry

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:1122


retryDelay?

optional retryDelay: RetryDelayValue<TError>

Inherited from

UseMutationOptions.retryDelay

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:1123


scope?

optional scope: MutationScope

Inherited from

UseMutationOptions.scope

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:1128


throwOnError?

optional throwOnError: boolean | (error) => boolean

Inherited from

UseMutationOptions.throwOnError

Defined in

node_modules/.pnpm/@tanstack+query-core@5.59.13/node_modules/@tanstack/query-core/build/legacy/hydration-mKPlgzt9.d.ts:1131


trpc?

optional trpc: TRPCReactRequestOptions

tRPC-related options

Inherited from

TRPCUseQueryBaseOptions.trpc

Defined in

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