aPureBase / KGraphQL

Pure Kotlin GraphQL implementation
https://kgraphql.io
MIT License
298 stars 58 forks source link

GraphQL Errors don't have correct content type #218

Open Martmists-GH opened 1 year ago

Martmists-GH commented 1 year ago

Query:

query {
  nonExistentQuery
}

Response:

// Content-Type: text/plain;charset=UTF-8
{
  "errors": [
    {
      "message": "Property nonExistentQuery on Query does not exist",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": []
    }
  ]
}

The expected behaviour is to have content-type of application/json on errors, which it already does on successes.