graphql / graphql-playground

🎮 GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)
MIT License
8.77k stars 735 forks source link

Error if added Content-Type #1009

Open amian84 opened 5 years ago

amian84 commented 5 years ago

This issue pertains to the following package(s):

What OS and OS version are you experiencing the issue(s) on?

Ubuntu 18.04

What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?

1.7.20

What is the expected behavior?

Added header content-type if you write a content-type in header

What is the actual behavior?

if you try add header "Content-type", doesnt works, playground concat application/json with the new content-type setted. Only works properly if write content-type key in lowercase

What steps may we take to reproduce the behavior?

Added header Content-Type (not in lowecase) to headers

bugcontenttype

homerjam commented 4 years ago

Please fix this! :)

It also happens with the Accept header and means that the playground can't be used with the Shopify Storefront API.

Edit:

Only works properly if write content-type key in lowercase

Just saw this workaround!