Skip to main content
Version: v10.0.0

RequestPatch

What a loader, mapping or mutation adds to a request: path params, query params and payload, each checked against the request's own types. Objects are merged into what the request already has.


Import
import { RequestPatch } from "@hyper-fetch/db"

Preview​

type RequestPatch<Req> = {
params?: PartialIfObject<NonNullable<ExtractParamsType<Req>>>;
payload?: PartialIfObject<NonNullable<ExtractPayloadType<Req>>>;
queryParams?: PartialIfObject<NonNullable<ExtractQueryParamsType<Req>>>;
}

Structure​

RequestPatch
NameTypeDescription
params
PartialIfObject<NonNullable<ExtractParamsType<Req>>>
payload
PartialIfObject<NonNullable<ExtractPayloadType<Req>>>
queryParams
PartialIfObject<NonNullable<ExtractQueryParamsType<Req>>>