Execute Operation

Beta

Executes a GraphQL operation (query or mutation) via a POST request with a JSON body.

Request

This endpoint expects an object.
querystringRequired
The GraphQL query or mutation string to execute.
operationNamestringOptional
Specifies which operation to execute if the query string contains multiple operations.
variablesmap from strings to anyOptional
A JSON object containing variables referenced in the query.

Response

This endpoint returns an object.
datamap from strings to any
The payload returned by the GraphQL execution.
errorslist of objects
A list of errors that occurred during execution.
extensionsmap from strings to any

Reserved for implementors to extend the protocol (e.g., tracing data).