Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MutationOptions<TData, TVariables>

Options of useMutation

Type parameters

Hierarchy

  • CommonHookOptions<TData, TVariables>
    • MutationOptions

Index

Properties

Optional fetchTimeout

fetchTimeout: undefined | number

Fetch timeout time, by default it's 10000 ms

Optional headers

headers: Headers

Headers added to the fetch call

Optional onCompleted

onCompleted: undefined | ((data: Maybe<TData>) => void)

Event called on every successful hook call. Including cache updates, setData calls, and successful network calls.

(data: Maybe) => void

Optional onError

onError: undefined | ((errors: GraphQLError[]) => void)

Event called on GraphQL error on hook call.

Optional sharedCacheId

sharedCacheId: keyof gqlessSharedCache

Shared hook cache id

In order to be able to update a query data based on this mutation result you can specify a shared cache id between those hooks which will update the queries data

Optional variables

variables: TVariables

Variables used in the hook call.

Hook automatically called on any variable change in useQuery.

Generated using TypeDoc