Skip to main content

Interface: UseMutationOptions<TData>#

Type parameters#

Name
TData

Properties#

awaitRefetchQueries#

• Optional awaitRefetchQueries: boolean

Await refetch resolutions before calling the mutation actually complete

Defined in: react/src/mutation/useMutation.ts:25


noCache#

• Optional noCache: boolean

Defined in: react/src/mutation/useMutation.ts:12


nonSerializableVariables#

• Optional nonSerializableVariables: boolean

Activate special handling of non-serializable variables, for example, files uploading

default false

Defined in: react/src/mutation/useMutation.ts:36


onCompleted#

• Optional onCompleted: (data: TData) => void

Type declaration:#

â–¸ (data: TData): void

Parameters:#

NameType
dataTData

Returns: void

Defined in: react/src/mutation/useMutation.ts:13


onError#

• Optional onError: OnErrorHandler

Defined in: react/src/mutation/useMutation.ts:14


refetchQueries#

• Optional refetchQueries: unknown[]

Refetch specific queries after mutation completion.

You can give functions or parts of the schema to be refetched

Defined in: react/src/mutation/useMutation.ts:21


retry#

• Optional retry: RetryOptions

Defined in: react/src/mutation/useMutation.ts:15


suspense#

• Optional suspense: boolean

Enable suspense behavior

Defined in: react/src/mutation/useMutation.ts:29

Last updated on by PabloSzx