Graphql : Failing on wrong content-type message #5174
Labels
area/graphql
Issues related to GraphQL support on Dgraph.
area/integrations
Related to integrations with other projects.
status/accepted
We accept to investigate/work on it.
What version of Dgraph are you using?
v20.03.0
Have you tried reproducing the issue with the latest release?
Yes
What is the hardware spec (RAM, OS)?
Mac for client and running dgraph/standalone in a container
Steps to reproduce the issue (command/config used to run Dgraph).
This code is making a graphql call using Machine-Box and it is failing with the following error.
https://play.golang.org/p/T6YVYIs3AOD
This is not accurate since Machine-Box is setting the
content-type
properly on line 117. Machine-Box sets thecontent-type
in the http call like this.https://github.com/machinebox/graphql/blob/v0.2.2/graphql.go#L117
As you can see, the
content-type
is correct. Adding the charset should not cause Dgraph to fail.Expected behaviour and actual result.
The code provided should work. The code inside of dgraph that is not parsing the
content-type
correctly can be found here.https://github.com/dgraph-io/dgraph/blob/master/dgraph/cmd/alpha/http.go#L179
The text was updated successfully, but these errors were encountered: