Tools / GraphQL Playground

GraphQL Playground.

Send GraphQL queries and mutations from your browser, with variables, headers and a schema explorer.

Runs in your browser Your browser sends requests to the endpoint directly; nothing passes through our server.

Ctrl/⌘ + Enter
Response

            
        

About GraphQL Playground

GraphQL Playground is a lightweight GraphQL client that runs in your browser. Enter an endpoint, add headers such as Authorization if the API needs them, write a query or mutation with variables, and press Run; the response appears with its HTTP status, timing and size, and GraphQL errors are highlighted separately from data. Before the request is sent, the query is checked locally: brackets must balance, the variables must be a JSON object, and when the document contains several operations you must say which one to run, which mirrors the rule servers apply and saves a confusing round trip. The request body preview shows exactly what is posted, with query, operationName and variables, so you can copy it into curl or your own code. The schema explorer runs the standard introspection query and lists every type with its fields, arguments and return types, making it easy to discover what an unfamiliar API offers. For example, against a public countries API, the query Country($code: ID!) with {"code": "UA"} returns the name, capital and currency of Ukraine. Common mistakes it helps catch are variables that are declared but not passed, passing variables as a string instead of a JSON object, and production servers that disable introspection, in which case the explorer reports the error. Requests go directly from your browser to the endpoint, which therefore has to allow cross-origin requests; this site never sees your queries or tokens.

How to Use

  1. Enter the GraphQL endpoint URL and any headers, such as Authorization: Bearer ….
  2. Write the query, add variables as JSON and set the operation name if there are several operations.
  3. Press Run to see the response, or Load schema to browse types and fields.

Frequently Asked Questions

Does my request go through your server?

No. Your browser sends the POST request directly to the endpoint, so tokens and data never reach this site.

Why do I get a network or CORS error?

The endpoint must allow cross-origin requests from this site and the headers you send. Many APIs only allow their own domains; in that case use a desktop client or curl.

Why is the schema explorer empty?

Some production servers disable introspection for security. The explorer shows the error the server returns; ask the API owner for the schema file instead.

Are subscriptions supported?

No. Subscriptions need a WebSocket or SSE transport; use the WebSocket tester with the graphql-transport-ws subprotocol for those.

Related Tools