InsertMutation
Import
import { InsertMutation } from "@hyper-fetch/db"
Source
Package
Preview
type InsertMutation<Row,Req,Mapped,Success> = {
map: (row: Row, context: MutationContext) => RequestPatch<Req>;
onSuccess?: Success & MutationSuccessMode;
optimistic?: boolean;
outbox?: boolean;
request: Req;
row?: (response: ExtractResponseType<Req>) => Mapped;
}
Structure
InsertMutation
| Name | Type | Description |
|---|---|---|
| onSuccess | | Needed when the response is not the row |
| optimistic | |
|
| outbox | |
|
| request | | |
| map | | |
| row | | Reads the inserted row from the response |
