Closed as not planned
Description
As explained in the GraphQL over HTTP spec:
If the GraphQL response does not contain the {data} entry then the server MUST reply with a 4xx or 5xx status code as appropriate.
Note: The GraphQL specification indicates that the only situation in which the GraphQL response does not include the {data} entry is one in which the {errors} entry is populated.
If the GraphQL request is invalid (e.g. it is malformed, or does not pass validation) then the server SHOULD reply with 400 status code.
Currently Spring for GraphQL responds with an HTTP 200 OK response in this case:
{
"errors": [
{
"message": "Validation error (FieldUndefined@[spring]) : Field 'spring' in type 'Query' is undefined",
"locations": [
{
"line": 2,
"column": 3
}
],
"extensions": {
"classification": "ValidationError"
}
}
]
}