Type Alias: HTTPBatchLinkOptions<TRoot>
On this page
HTTPBatchLinkOptions<
TRoot>:HTTPLinkBaseOptions<TRoot> &object
Defined in: packages/client/dist/httpBatchLink-Dxqsu9CE.d.mts:10
The options of httpBatchLink.
Type declaration
headers?
optionalheaders:HTTPHeaders| (opts) =>HTTPHeaders|Promise<HTTPHeaders>
Headers for each request: an object, or a function of the batch's operations that returns them.
See
https://trpc.io/docs/client/headers
maxItems?
optionalmaxItems:number
The most calls one batch can have. Set it to the server's
maxBatchSize or lower.
See
https://trpc.io/docs/client/links/httpBatchLink#limiting-batch-size
Default
InfinitymaxURLLength?
optionalmaxURLLength:number
The longest URL a batched GET request can have. Calls that would make it longer go in another batch. A call too long on its own fails.
See
https://trpc.io/docs/client/links/httpBatchLink#setting-a-maximum-url-length
Default
InfinityType Parameters
| Type Parameter |
|---|
TRoot extends AnyClientTypes |