deftools.io Developer Tools

GraphQL Client

Query any GraphQL API — write a query, add variables and headers, send the request, and view the JSON response with export to cURL or fetch

Variables (JSON)
Headers
  

About this tool

Query any GraphQL API directly from your browser. Paste a GraphQL endpoint, write a query in the editor with syntax highlighting, add optional variables and custom headers, and send the request. The JSON response is displayed with syntax highlighting, and you can copy it, export the request as a cURL command, or generate a fetch() snippet.

Example: set the endpoint to https://spacex-production.up.railway.app/, enter the query query { company { name ceo employees } }, and click Send. The tool displays the JSON response with the company name, CEO, and employee count.

Your last 20 queries are saved locally, so you can revisit earlier requests without typing them again.

FAQ

Does this tool send the query to a server?

The query is sent directly from your browser to the GraphQL endpoint you provide — no data passes through DeftTools servers. Make sure the endpoint accepts requests from browser origins (CORS), or use a public proxy/passthrough endpoint.

Why does my query fail with a CORS error?

Browsers enforce the same-origin policy: a page on deftools.io cannot make requests to another domain unless that domain allows it via CORS headers. Many public GraphQL APIs (like the SpaceX example) allow cross-origin requests, but private or internal endpoints often do not. Use a browser extension to disable CORS during development, or route requests through a proxy.

How do I use query variables?

Expand the "Variables" section and enter a JSON object matching the variable names in your query. For example, if your query references <code>$id</code>, enter <code>{"id": "42"}</code> in the variables field. The tool merges them into the request body automatically.

Can I share a query with someone?

Yes. After filling in the endpoint and query, copy the current URL with query parameters — the tool loads them on page load via <code>?ep=&q=&v=</code>. This works for short queries; for longer ones, export the cURL or fetch snippet and share that instead.

More developer tools

Copied!