Skip to main content
CalcChef

GraphQL Query Builder

Test a GraphQL query in the browser: send it with variables and headers, pick fields from the introspected schema, read the response and copy it as cURL. How it works

Use the GraphQL Query Builder

Requests are sent directly from your browser to the endpoint URL you enter. Request headers and variables are kept in memory only: they are not saved in your browser and are not included in share links. The endpoint, query, operation name and schema are saved in your browser, and the endpoint and query are included in share links.

About the GraphQL Query Builder

Enter an endpoint, a query and optional variables and headers, then press Run. The tool sends one POST request with a JSON body of query, variables and operationName, and shows the status, the time, the response and the response headers that CORS lets the page read. Introspect fetches the schema, and its field picker writes a query from the fields you tick; Copy as cURL writes the same request for a terminal. The query box is plain text, and the server does the validation.

How to use this tool

  1. Enter the endpoint URL, for example https://api.example.com/graphql.
  2. Type the query, then the variables as JSON. Add headers such as Authorization on the Headers tab.
  3. Press Run to send the query, or Introspect to read the schema. On the Schema tab, tick fields and arguments in the picker and press Use in query editor to fill in the query and its variables.
  4. Read the data, errors and response headers tabs. Use Copy as cURL or Copy Share URL to pass the request on.

Frequently asked questions

How do I test a GraphQL query in the browser?
Paste the endpoint, type the query and its variables, add any header the API needs and press Run. The request goes from your browser to that endpoint, and the response appears with the status code and the time it took. GraphQL errors in the response are listed in the errors tab.
Why do I get a CORS or network error?
The browser does not say why a request failed, so the page shows one message for CORS, DNS, TLS and a dropped connection. If curl reaches the endpoint, the server probably does not allow this page's origin in its CORS headers. The page says You appear to be offline when the browser reports no connection.
How do I get a GraphQL schema with introspection?
Press Introspect. The tool sends a short introspection query with your headers and writes a list of each type with its fields, such as posts: [Post!]!, on the Schema tab. The same result feeds a field picker that writes a query from the fields you tick. It is not full SDL: input-object fields, default values, descriptions and directives are not requested, and the list is not used for checking or completion. Pasting an introspection result (JSON) on that tab also feeds the picker. A server can turn introspection off, and then the page shows the error the server returned.
Does the tool validate my query?
Only lightly. It checks that the opening and closing braces balance and that the variables are valid JSON before it sends the request. Field names, types and arguments are checked by the server, which returns errors in the response.
Are my headers and tokens saved?
Headers and variables stay in memory and are not saved. The endpoint, query, operation name, the schema list and the introspection result behind the field picker are saved in this browser (a schema over 200,000 characters is kept for the visit only), so keep a token out of the endpoint URL. Copy Share URL puts the endpoint and the query in the link and leaves the variables and headers out. Copy as cURL is different: it writes every header with a value, tokens included, so mask them before you share the command.

Network use

When you press Run, this tool sends your query, variables and headers to the GraphQL endpoint URL you enter. Introspect sends a standard introspection query and your headers, not your variables. Privacy policy

Related Tools

View all tools