Interface: UseTRPCMutationOptions<TInput, TError, TOutput, TContext>
Defined in: packages/react-query/src/shared/hooks/types.ts:154
Extends
UseMutationOptions<TOutput,TError,TInput,TContext>.TRPCUseQueryBaseOptions
Type Parameters
| Type Parameter | Default type |
|---|---|
TInput | - |
TError | - |
TOutput | - |
TContext | unknown |
Properties
gcTime?
optionalgcTime: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?
optionalmeta: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?
optionalmutationFn: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?
optionalmutationKey: readonlyunknown[]
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?
optionalnetworkMode: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()?
optionalonError: (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
| Parameter | Type |
|---|---|
error | TError |
variables | TInput |
context | undefined | TContext |
Returns
void | Promise<void>
Inherited from
UseMutationOptions.onError
onMutate()?
optionalonMutate: (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
| Parameter | Type |
|---|---|
variables | TInput |
Returns
undefined | TContext | Promise<undefined | TContext>
Inherited from
UseMutationOptions.onMutate
onSettled()?
optionalonSettled: (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
| Parameter | Type |
|---|---|
data | undefined | TOutput |
error | null | TError |
variables | TInput |
context | undefined | TContext |
Returns
void | Promise<void>
Inherited from
UseMutationOptions.onSettled
onSuccess()?
optionalonSuccess: (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
| Parameter | Type |
|---|---|
data | TOutput |
variables | TInput |
context | TContext |
Returns
void | Promise<void>
Inherited from
UseMutationOptions.onSuccess
retry?
optionalretry: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?
optionalretryDelay: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?
optionalscope: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?
optionalthrowOnError: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?
optionaltrpc:TRPCReactRequestOptions
Defined in: packages/react-query/src/shared/hooks/types.ts:58
tRPC-related options