Response Format
A response to a GraphQL operation must be a map.
If the operation included execution, the response map must contain a first entry with keydata
. The value of this entry is described in the “Data” section. If the operation failed before execution, due to a syntax error, missing information, or validation error, this entry must not be present.
If the operation encountered any errors, the response map must contain a next entry with keyerrors
. The value of this entry is described in the “Errors” section. If the operation completed without encountering any errors, this entry must not be present.
The response map may also contain an entry with keyextensions
. This entry, if set, must have a map as its value. This entry is reserved for implementors to extend the protocol however they see fit, and hence there are no additional restrictions on its contents.
To ensure future changes to the protocol do not break existing servers and clients, the top level response map must not contain any entries other than the three described above.