Default headers in @graphql-tools/url-loader
are case sensitive
#4482
Open
4 tasks
@graphql-tools/url-loader
are case sensitive
#4482
Issue workflow progress
Progress of the issue based on the Contributor Workflow
Describe the bug
Default headers (
accept
andcontent-type
) forUrlLoader
are set with the keys in lower case. If you try to override them but use capitalized keys, the headers get duplicated. For example, if I set the header the way it is demonstrated in the documentation, I send bothaccept
andAccept
headers. The same problem occurs withcontent-type
header.For me this produced a bag with introspection of this endpoint—
https://api.spacex.land/graphql
To Reproduce
Steps to reproduce the behavior:
customFetch
function to capture headers to be sendload
methodload
methodSandbox with reproduced error
How the error was found:
load
function with urlhttps://api.spacex.land/graphql
and set theSet-Content
header to default value ofapplication/json
Sandbox with reproduction
Expected behavior
Environment:
@graphql-tools/url-loader
:Additional context
The text was updated successfully, but these errors were encountered: