Core
QuerySerializer
Serializes an encoded query object into a query string.
@defjs/core · Type
Signature
type QuerySerializer = (query: { [key: string]: unknown }) => string;
query is the wire object: aliases already applied, Date values already ISO strings, bigint values already strings. Nested objects and arrays are preserved. The string is used verbatim and is not passed through URLSearchParams. Interceptors see queryParams as new URLSearchParams(queryString).
Set it with withQuerySerializer. Without one, queries use URLSearchParams: arrays repeat keys and a nested object fails. A builder that returns URLSearchParams skips the serializer.
Parameters
Prop
Type
query { [key: string]: unknown; }Encoded query object.
Returns
The query string without a leading ?.