Open History to see the last commit
Defined in: packages/db/src/types.ts:187
Options for the createOptimisticAction helper
Extends#
Omit<TransactionConfig<T>,"mutationFn">
Type Parameters#
TVars#
TVars = unknown
T#
T extends object = Record<string, unknown>
Properties#
autoCommit?#
optional autoCommit: boolean;
Defined in: packages/db/src/types.ts:178
Inherited from#
id?#
optional id: string;
Defined in: packages/db/src/types.ts:176
Unique identifier for the transaction
Inherited from#
metadata?#
optional metadata: Record<string, unknown>;
Defined in: packages/db/src/types.ts:181
Custom metadata to associate with the transaction
Inherited from#
mutationFn()#
mutationFn: (vars, params) => Promise<any>;
Defined in: packages/db/src/types.ts:194
Function to execute the mutation on the server
Parameters#
vars#
TVars
params#
Returns#
Promise<any>
onMutate()#
onMutate: (vars) => void;
Defined in: packages/db/src/types.ts:192
Function to apply optimistic updates locally before the mutation completes
Parameters#
vars#
TVars
Returns#
void