GraphQL Query Tester

Paste a GraphQL operation and variables to format, validate syntax, inspect the AST, and prepare requests without calling an API.

GraphQL operation

Paste a query, mutation, subscription, or fragment. This tester never executes it.

Processed locally in your browser Limit Browser memory. Your input is processed in your browser and is not uploaded or sent to a server. Avoid pasting production secrets, access tokens, private keys, passwords, or sensitive customer data unless you understand the risk.

Inspection results

Syntax, operation details, variables JSON, directives, fragments, and AST.

Ready to inspect GraphQL

Paste an operation or load a sample. The tester parses text locally and never connects to an endpoint.

Tip: Press Ctrl+Enter or Command+Enter in either editor to validate immediately.

GraphQL Query Testing Guide

Validate operation syntax without executing requests

Use this tester when you need to review GraphQL operations, fragments, variables JSON, directives, and AST shape before moving text into your own client or API workflow.

GraphQL Query Tester vs GraphQL Formatter

The formatter focuses on whitespace for operations and schema SDL. This tester focuses on operation documents, variables JSON, AST inspection, and request-preparation checks without schema fetching.

Local query validation

The parser checks GraphQL syntax for queries, mutations, subscriptions, and fragments. It reports line and column details for malformed braces, strings, arguments, and variable definitions.

Variables JSON

GraphQL variables are supplied separately as JSON. This page validates and formats that JSON locally, then warns when an operation declares variables but the variables object is empty.

Common syntax mistakes

Missing selection-set braces, extra commas, unterminated strings, invalid variable syntax, misplaced directives, and unfinished fragments are common issues caught before a query reaches an API.

AST overview

The AST view shows the parsed document structure with location metadata removed. It is helpful for understanding operations, selections, fragment definitions, directives, and variable nodes.

Not a GraphQL client

This tool has no endpoint field and performs no introspection, schema loading, remote validation, query execution, mutation execution, subscriptions, or network requests.

GraphQL Query Tester FAQ

Does this tester run GraphQL queries or mutations?

No. It treats GraphQL as text, parses syntax locally, formats the document, and validates variables JSON. It never connects to a GraphQL endpoint.

Can it validate fields against my schema?

No. Schema-aware validation requires a schema. This tool intentionally avoids introspection and remote schema fetching, so it checks syntax and local structure only.

Can I inspect fragments and directives?

Yes. Parsed fragment definitions, operation variables, and directive usage are listed in the results panel when the GraphQL document is syntactically valid.

How should I use the variables editor?

Paste the JSON object your own GraphQL client would send as variables. The tester validates JSON syntax and formats it, but it does not compare values against schema types.