LoaderConfig
Import
import { LoaderConfig } from "@hyper-fetch/db"
Source
Package
Preview
type LoaderConfig = {
byKey?: (key: RowKey) => AnyRequestPatch;
byKeys?: (keys: RowKey[]) => AnyRequestPatch;
cursor?: (response: unknown) => unknown;
fixed?: Record<string, unknown>;
kind: list | byKey | byKeys;
limit?: (limit: number) => AnyRequestPatch;
notation?: Notation;
orderBy?: Record<string, unknown>;
page?: (cursor: unknown) => AnyRequestPatch;
request: RequestInstance;
rows?: (response: unknown) => readonly unknown[];
serverOnly?: readonly string[];
where?: Record<string, Partial<Record<ComparisonOperator, unknown>> & { required?: true }>;
}
Structure
LoaderConfig
| Name | Type | Description |
|---|---|---|
| fixed | | |
| kind | | |
| notation | | |
| orderBy | | |
| request | | |
| serverOnly | | |
| where | | |
| byKey | | |
| byKeys | | |
| cursor | | |
| limit | | |
| page | | |
| rows | |
