# GraphQL Client

> Query any GraphQL endpoint with variables, headers, and history.

Free GraphQL playground. Send queries to any GraphQL endpoint with JSON variables and custom headers, inspect pretty-printed responses and errors, and replay recent requests from history. Timing is reported per request.

- Page: https://benchline.fabwaseem.com/t/graphql-client
- Runs: in the browser, plus one server fetch of the public URL you give it.
- Price: free, no account
- Input: Endpoint URL, GraphQL query, JSON variables, and custom headers.
- Output: Response data or errors, HTTP status, and duration.
- Keywords: graphql client online, graphql playground, test graphql api, graphql query tester
- Updated: 2026-10-18
- Built by: Waseem Anjum (https://fabwaseem.com)

## How to use it

1. **Enter the endpoint.** Paste the GraphQL HTTP endpoint URL, e.g. https://countries.trevorblades.com/.
2. **Write the query.** Add the query plus optional JSON variables and custom headers.
3. **Send and inspect.** Read the pretty-printed response, the status, and the round-trip time. Recent requests stay in history.

## Use it from an AI agent

MCP tool name: `execute_graphql`
MCP endpoint: https://benchline.fabwaseem.com/mcp (Streamable HTTP, no key)
HTTP: POST https://benchline.fabwaseem.com/api/v1/tools/graphql-client with the input as the JSON body
This call fetches a public URL on the server. Private addresses are refused.

Send a GraphQL query with optional variables and headers to a public http or https endpoint on port 80 or 443 and return the response data or errors. Local, private, and internal addresses are refused.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "endpoint": {
      "type": "string",
      "maxLength": 2000,
      "format": "uri"
    },
    "query": {
      "type": "string",
      "minLength": 1,
      "maxLength": 50000
    },
    "variables": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "headers": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    "timeoutMs": {
      "default": 15000,
      "type": "integer",
      "minimum": 1000,
      "maximum": 60000
    }
  },
  "required": [
    "endpoint",
    "query",
    "timeoutMs"
  ],
  "additionalProperties": false
}
```

### Example tools/call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "execute_graphql",
    "arguments": {
      "endpoint": "https://example.com/file",
      "query": "example",
      "timeoutMs": 15000
    }
  }
}
```

Setup for Claude, Cursor, and VS Code: https://benchline.fabwaseem.com/mcp/guide

## Questions

### Why does my endpoint fail from the browser?

Browsers enforce CORS: the endpoint must allow cross-origin requests from this page. If it does not, the request is blocked before it leaves. The same query works from a server or curl.

### Are my queries or tokens sent anywhere else?

No. Requests go straight from your browser to the endpoint you typed. History is kept in this browser's local storage only.

### How do variables work?

Write them as a JSON object and reference them in the query, e.g. query ($code: ID!) with { "code": "DE" }.

### What is the timeout?

Requests abort after 15 seconds in the UI. The API version accepts a timeout up to 60 seconds.

## Related tools

- [cURL Converter](https://benchline.fabwaseem.com/t/curl-converter): Turn any curl command into fetch, Python, Go, PHP, or Rust.
- [HTTP headers](https://benchline.fabwaseem.com/t/http-headers-checker): Follow redirects and grade the security headers on a public URL.
- [URL encoder and parser](https://benchline.fabwaseem.com/t/url-codec): Encode or decode a URL, then break the query string into parameters.
- [JSON formatter](https://benchline.fabwaseem.com/t/json-formatter): Pretty-print, minify, and validate JSON, with the exact line and column when it fails.
