Skip to main content
Version: 11.x

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

Defined in: packages/react-query/src/shared/hooks/types.ts:154

Extendsโ€‹

Type Parametersโ€‹

Type ParameterDefault type
TInput-
TError-
TOutput-
TContextunknown

Propertiesโ€‹

gcTime?โ€‹

optional gcTime: number

Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:1190

Inherited fromโ€‹

UseMutationOptions.gcTime


meta?โ€‹

optional meta: Record<string, unknown>

Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:1192

Inherited fromโ€‹

UseMutationOptions.meta


mutationFn?โ€‹

optional mutationFn: MutationFunction<TOutput, TInput>

Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:1181

Inherited fromโ€‹

UseMutationOptions.mutationFn


mutationKey?โ€‹

optional mutationKey: readonly unknown[]

Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:1182

Inherited fromโ€‹

UseMutationOptions.mutationKey


networkMode?โ€‹

optional networkMode: NetworkMode

Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:1189

Inherited fromโ€‹

UseMutationOptions.networkMode


onError()?โ€‹

optional onError: (error, variables, context) => void | Promise<void>

Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:1185

Parametersโ€‹

ParameterType
errorTError
variablesTInput
contextundefined | TContext

Returnsโ€‹

void | Promise<void>

Inherited fromโ€‹

UseMutationOptions.onError


onMutate()?โ€‹

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

Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:1183

Parametersโ€‹

ParameterType
variablesTInput

Returnsโ€‹

undefined | TContext | Promise<undefined | TContext>

Inherited fromโ€‹

UseMutationOptions.onMutate


onSettled()?โ€‹

optional onSettled: (data, error, variables, context) => void | Promise<void>

Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:1186

Parametersโ€‹

ParameterType
dataundefined | TOutput
errornull | TError
variablesTInput
contextundefined | TContext

Returnsโ€‹

void | Promise<void>

Inherited fromโ€‹

UseMutationOptions.onSettled


onSuccess()?โ€‹

optional onSuccess: (data, variables, context) => void | Promise<void>

Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:1184

Parametersโ€‹

ParameterType
dataTOutput
variablesTInput
contextTContext

Returnsโ€‹

void | Promise<void>

Inherited fromโ€‹

UseMutationOptions.onSuccess


retry?โ€‹

optional retry: RetryValue<TError>

Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:1187

Inherited fromโ€‹

UseMutationOptions.retry


retryDelay?โ€‹

optional retryDelay: RetryDelayValue<TError>

Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:1188

Inherited fromโ€‹

UseMutationOptions.retryDelay


scope?โ€‹

optional scope: MutationScope

Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:1193

Inherited fromโ€‹

UseMutationOptions.scope


throwOnError?โ€‹

optional throwOnError: boolean | (error) => boolean

Defined in: node_modules/.pnpm/@tanstack+query-core@5.80.2/node_modules/@tanstack/query-core/build/modern/hydration-DYrnn9Jo.d.ts:1196

Inherited fromโ€‹

UseMutationOptions.throwOnError


trpc?โ€‹

optional trpc: TRPCReactRequestOptions

Defined in: packages/react-query/src/shared/hooks/types.ts:58

tRPC-related options

Inherited fromโ€‹

TRPCUseQueryBaseOptions.trpc