execute_query
Query a GraphQL endpoint with a raw query string and optional variables. Returns the response data field or a structured error message.
Instructions
Send a raw GraphQL query string to the endpoint. Use this when you already have a complete query — for example, one written by a human or copied from API docs. Returns the data field of the response, or a structured error message if the server returned errors. Variables are passed through as-is. Idempotent: same query → same result (for read-only queries).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | GraphQL query string. Example: '{ user(id: 42) { id name email } }' | |
| variables | No | Variables to pass alongside the query. Example: { 'id': 42 }. Use ${varName} in the query to reference them. | |
| operation_name | No | If the query contains multiple operations, the name of the one to execute. |