smallrye / smallrye-graphql

Implementation for MicroProfile GraphQL
Apache License 2.0
160 stars 92 forks source link

removed unnecessary "data": null if request failed before execution #2225

Closed mskacelik closed 2 days ago

mskacelik commented 1 week ago

https://spec.graphql.org/draft/#sec-Response-Format

If the request included execution, the response map must contain an entry with key data. The value of this entry is described in the “Data” section. If the request failed before execution due to a syntax error, missing information, or validation error, this entry must not be present.

The only exception is our bean validation, responses during an error contain this field:

"data" : {
    operationName: null
}

There was no need to change anything on the client side.

fix:#2081

mskacelik commented 1 week ago

Quarkus branch: https://github.com/mskacelik/quarkus/tree/srgql-2.11.1