Skip to content

API Documentation / @pinia/colada / UseMutationEntry

Interface: UseMutationEntry<TData, TVars, TError, TContext> ​

A mutation entry in the cache.

Type Parameters ​

TData ​

TData = unknown

TVars ​

TVars = unknown

TError ​

TError = unknown

TContext ​

TContext extends Record<any, any> = _EmptyObject

Properties ​

asyncStatus ​

ts
asyncStatus: ShallowRef<AsyncStatus>;

The async status of the mutation.


ext ​

ts
readonly ext: UseMutationEntryExtensions<TData, TVars, TError, TContext>;

Extensions to the mutation entry added by plugins. You should only add properties to the object, not replace it.


gcTimeout ​

ts
gcTimeout: Timeout | undefined;

Timeout id that scheduled a garbage collection. It is set here to clear it when the entry is used by a different component.


id ​

ts
id: number;

Unique id of the mutation entry. 0 if the entry is not yet in the cache.


key ​

ts
key: EntryKey | undefined;

The key associated with this mutation entry. Can be undefined if the entry has no key.


meta ​

ts
meta: MutationMeta;

Resolved meta information for this mutation.


options ​

ts
options: UseMutationOptionsWithDefaults<TData, TVars, TError, TContext>;

Options used to create the mutation.


state ​

ts
state: ShallowRef<DataState<TData, TError>>;

The state of the mutation. Contains the data, error and status.


vars ​

ts
vars: TVars | undefined;

The variables used to call the mutation.


when ​

ts
when: number;

When was this data fetched the last time in ms

Released under the MIT License.