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
asyncStatus: ShallowRef<AsyncStatus>;The async status of the mutation.
ext
ext: UseMutationEntryExtensions<TData, TVars, TError, TContext>;Extensions to the mutation entry added by plugins.
gcTimeout
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
id: string;Unique id of the mutation entry. Empty string if the entry is not yet in the cache.
key
key: EntryKey | undefined;The serialized key associated with this mutation entry.
keyHash
keyHash: string | undefined;Seriaized version of the key. Used to retrieve the entry from the cache. Can be undefined if the entry has no key.
options
options: UseMutationOptions<TData, TVars, TError, TContext>;Options used to create the mutation.
state
state: ShallowRef<DataState<TData, TError>>;The state of the mutation. Contains the data, error and status.
vars
vars: TVars | undefined;The variables used to call the mutation.
when
when: number;When was this data fetched the last time in ms