Designer 10.7 | webMethods Service Development Help | Working with GraphQL Descriptors | Invoking a GraphQL Descriptor | How Integration Server Sends Response to a GraphQL Request
 
How Integration Server Sends Response to a GraphQL Request
Regardless of the method by which the query and variables are sent, Integration Server returns the response in JSON format. As mentioned in the GraphQL specification, a query might result in some data and errors, so the response might contain data and error both or only data in a JSON object.
{
"data": { ... },
"errors": [ ... ]
}
According to the GraphQlL specification, if there is no error while executing the request then Integration Server does not include errors field in the response. If there is no data entry exist in the response then Integration Server does not keep the error entry as empty. The response may contain both the entries, data and errors.