Defined in: packages/db/src/types.ts:179
Options for the createOptimisticAction helper
TVars = unknown
T extends object = Record<string, unknown>
optional autoCommit: boolean;
Defined in: packages/db/src/types.ts:170
optional id: string;
Defined in: packages/db/src/types.ts:168
Unique identifier for the transaction
Omit.id
optional metadata: Record<string, unknown>;
Defined in: packages/db/src/types.ts:173
Custom metadata to associate with the transaction
Omit.metadata
mutationFn: (vars, params) => Promise<any>;
Defined in: packages/db/src/types.ts:186
Function to execute the mutation on the server
TVars
Promise<any>
onMutate: (vars) => void;
Defined in: packages/db/src/types.ts:184
Function to apply optimistic updates locally before the mutation completes
TVars
void
