-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Hi,
fetchBaseQuery accepts an optional paramsSerializer.
This docs page says that the params will be passed to URLSearchParams directly:
params will be given directly to new URLSearchParams()
But if we look at the code, in fact there's a default transformation happening - an internal stripUndefined function is applied.
This transformation doesn't apply if a custom paramsSerializer is provided.
This can lead to an unexpected behavior. If user provides a basic custom paramsSerializer that takes the params and passes them to a new URLSearchParams, its behavior is gonna be different from the default paramsSerializer, contrary to what the docs say.
The description of paramsSerializer should be updated to mention this behavior
Metadata
Metadata
Assignees
Labels
No labels