GraphQL Playground

Write, validate, and explore GraphQL queries, mutations, and schemas. Paste a schema to browse types and fields, or load sample queries to get started.

GraphQL Query

Variables (JSON)

GraphQL Playground

Write, validate, and explore GraphQL queries, mutations, and schemas. Paste a schema to browse types and fields, or load sample queries to get started.

Features

  • Client-side query validation: brace / paren matching, operation keywords, variables JSON syntax
  • Schema explorer parses a pasted GraphQL SDL and lists types, inputs, enums
  • Built-in formatter for queries and SDL
  • This is a VALIDATOR — queries are NOT sent to a GraphQL endpoint
  • For actually executing queries, use GraphQL Playground (the original), GraphiQL, or your IDE's GraphQL extension

How to use

  1. Enter your GraphQL query in the editor or click a sample button to load an example query.
  2. Add JSON variables in the variables panel if your query uses parameters.
  3. Click Execute to validate the query syntax, or switch to the Schema Explorer tab to browse types.

Tips & Best Practices

  • Queries stay in your browser. CORS makes browser-side GraphQL execution unreliable for arbitrary endpoints, so this tool is a syntax sanity-check only.
  • For real query execution, use a desktop client (Insomnia, Postman) or a server-side proxy.
  • Variable validation is JSON-syntax only — the tool doesn't cross-check variable shapes against schema types.
  • Paste your schema's SDL into the schema panel to get the type list for autocomplete-style discovery.
  • Standard operation types (query / mutation / subscription) are recognised.

FAQ

Can this tool actually call a GraphQL API?

No. Due to browser CORS restrictions, this tool cannot execute queries against external APIs. It validates your query syntax and structure client-side so you can catch errors before running queries in your own application or API client.

What kind of validation does it perform?

The playground checks for matching braces and parentheses, valid operation keywords (query, mutation, subscription, fragment), empty selection sets, and valid JSON in the variables panel. It provides line-number references for each error found.

How does the Schema Explorer work?

Paste a GraphQL Schema Definition Language (SDL) document and click Parse Schema. The tool extracts all types, input types, and enums and displays them as browsable cards showing each field name and its type.

What sample queries are available?

Three sample queries are included: a basic users query demonstrating nested fields, a parameterized query with variables showing directives and pagination, and a mutation example with input objects and error handling.

Is my data private?

Yes. All validation and parsing happens entirely in your browser. No data is sent to any server. Your queries, variables, and schemas remain on your device at all times.

Can I use this for subscriptions?

You can write and validate subscription queries syntactically. However, since actual WebSocket connections to external servers are not supported, the subscription will not execute. The validator will still check the syntax for correctness.