{ } Formatters

GraphQL Playground

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

Mock resolvers Schema explorer Variables cURL export

How the GraphQL Playground Works

The ByteKiln GraphQL Playground uses the official graphql-js library running entirely 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.

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 running entirely 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.