Home > @tridion-sites/extensions > MutationResult
Signature:
export interface MutationResult<TData = unknown, TError = unknown, TVariables = unknown>
| Property | Modifiers | Type | Description |
|---|---|---|---|
| data | TData | undefined | The last successfully resolved data for the query. | |
| error | TError | null | The error object for the query, if an error was encountered. | |
| failureCount | number | ||
| failureReason | TError | null | ||
| isError | boolean | Is true when status is error. |
|
| isIdle | boolean | Is true when status is idle. |
|
| isPaused | boolean | ||
| isPending | boolean | Is true when status is loading. |
|
| isSuccess | boolean | Is true when status is success. |
|
| mutate | (…args: Parameters<MutateFunction<TData, TError, TVariables>>) => void | The mutation function to call with variables to trigger the mutation and optionally override options passed to useMutation. | |
| mutateAsync | MutateFunction<TData, TError, TVariables> | Similar to mutate but returns a promise which can be awaited. | |
| reset | () => void | A function to clean the mutation internal state (i.e., it resets the mutation to its initial state). | |
| status | MutationStatus | - idle initial status prior to the mutation function executing. - loading if the mutation is currently executing. - error if the last mutation attempt resulted in an error. - success if the last mutation attempt was successful. |
|
| variables | TVariables | undefined |