⌕ Test & Debug

GraphQL Playground

Write and execute GraphQL queries against a schema with mock data — no server needed.

Updated

Mock resolvers Schema explorer Variables cURL export

Loading GraphQL…

What this page sends

  • Your input: Queries run against mock resolvers in this tab. Nothing is sent to your API; the cURL export is text for you to copy.
  • Page load: Loading the page requests HTML, scripts and images from ByteKiln, fonts from Google Fonts, and sends Google Analytics page views, tool-usage events and catalog interactions (tool/category IDs, result status and whether a click followed search — never your input, output or search terms). Privacy & sharing

How the GraphQL Playground Works

The ByteKiln GraphQL Playground uses the official graphql-js library running in your browser. It parses your schema, builds mock resolvers, and executes queries locally.

Schema parsing

Your SDL is parsed with buildSchema() from graphql-js. Syntax errors are highlighted immediately. The type explorer lists all object types and their fields on the Types tab.

Mock data generation

The tool walks each query field's return type recursively and assigns mock values based on the GraphQL scalar type. This produces a valid response that matches your schema structure without any real data.

Query execution

Queries are executed by graphql-js's built-in executor with the mock root value. The JSON response is displayed with full formatting. Ctrl+Enter triggers execution from any input field.

Limitations

  • Queries run against mock resolvers generated from your schema, not a real server: values are type-appropriate placeholders that ignore your arguments and business rules.
  • Custom scalars get generic values, and directives such as @auth or @cost are parsed but have no effect.
  • Subscriptions and real network behaviour — auth headers, rate limits, persisted queries — can't be tested here. Use the cURL export to try the query against your API from a terminal.

FAQ

Short answers for the things developers usually ask before trusting a tool.

Does this send requests to a real GraphQL server?

No. The playground uses the graphql-js library in your browser. It parses your schema SDL, automatically generates mock resolvers that return realistic-looking fake data, and executes your query locally. No network request is made.

What schema SDL syntax is supported?

Full GraphQL SDL is supported — type definitions, interfaces, unions, enums, scalars, input types, and directives. The schema is parsed by the official graphql-js library, so any valid GraphQL SDL works.

How does the mock resolver work?

The tool inspects each field's type and returns a sensible mock value: strings get "Lorem ipsum", integers get 42, booleans get true, IDs get "1", lists return a single-item array, and nested objects are recursively mocked up to a depth of 4.

What is the cURL export for?

The cURL export generates a ready-to-paste terminal command that sends your query to a real GraphQL endpoint. Replace the placeholder URL with your actual API and add any auth headers needed.

Can I use variables in my queries?

Yes. Enter a JSON object in the Variables panel. The playground passes these to the graphql-js executor so you can test parameterized queries with $variableName syntax.

Related tools

Useful follow-ups when one conversion usually turns into three more.

Want the background and worked examples? There's a longer write-up.

Read the GraphQL guide