ResourceListOptions
Import
import { ResourceListOptions } from "@hyper-fetch/db"
Source
Package
Preview
type ResourceListOptions<Row,Node,Mapped,Filters,Cursor> = {
cursor?: (response: ExtractResponseType<ListRequest<Node>>) => Cursor | null | undefined;
page?: (cursor: Cursor) => RequestPatch<ListRequest<Node>>;
rows?: (response: ExtractResponseType<ListRequest<Node>>) => readonly Mapped[];
where?: readonly (Filters & ResourceQueryFilters<Row, Node>)[];
}
Structure
ResourceListOptions
| Name | Type | Description |
|---|---|---|
| where | | Query params sent as
|
| cursor | | Reads the next page's cursor, which makes the list paginated |
| page | | Sends a cursor to load the page after it |
| rows | | Reads complete rows from the list response |
