When I send a query with Content-Type as plain text, I keep getting a
{"errors":[{"message":"Must provide query string."}]}
When I convert the query to a JSON object and change the content-type to json, which is painful to do tbh, it works fine. This looks like a django-graphene issue. Is there a setting I need to set to allow for plain text?
Example of the query as plain text:
curl -d "query {
hello
}" -H "Content-Type: text/plain" "http://localhost:8000/graphql"
Example of the query as json
curl -d '{"query": "query { hello}" }' -H "Content-Type: application/json" "http://localhost:8000/graphql"
I'm registering the view like this:
path("graphql", csrf_exempt(GraphQLView.as_view(graphiql=True)))