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