Skip to content
Fields → GraphQL queryDeveloper tools

GraphQL Query Builder

Build GraphQL queries, mutations and subscriptions from a simple indented field list, with typed variables, fragments, a field list made from a JSON response, and ready fetch, curl and Apollo code.

About this tool

About GraphQL Query Builder

GraphQL Query Builder turns a plain list of fields into a correct, neatly indented GraphQL operation, so you can write and share queries without counting braces. Choose a query to read data, a mutation to change it, or a subscription for live updates, and give the operation a name such as GetUserProfile. Under Variables, add each one with its type (ID, String, Int, Float, Boolean, or an input type from your API such as CreateTaskInput), tick Required or List, and type a test value. In the field box, write one field per line and indent a line, with Tab or two spaces, to ask for it inside the field above. Arguments such as posts(first: $first), aliases such as avatar: profilePicture(size: 128), directives such as @include(if: $full), fragment spreads and inline fragments (... on Photo) are written just as in GraphQL. Shift+Tab moves a line back out, and Esc then Tab leaves the box. If you already have a response from the API, choose From a JSON response and paste it: the tool lists every field it contains, nested the same way, and uses the first item of each list. Fragment definitions go in their own box and are sent with the query. The finished operation is formatted and coloured, with the number of fields and how deep it goes, and the variables are shown as JSON with the right types. Checks catch a variable that is used but not declared, one that is declared but never used, a spread fragment with no definition, a subscription with more than one root field, unbalanced brackets, and very deep queries that many servers refuse. Add your endpoint to get request code for fetch, curl and Apollo Client (with useQuery, useMutation or useSubscription to match), or the raw JSON request body. Copy the query or save it as a .graphql file. The tool builds text only and does not call your API.

GraphQL Query Builder tool

Who uses a GraphQL builder

From first query to production code

Front-end developers

Write the query a screen needs.

ExampleUser with five recent posts.

Testing an API

curl command in one click.

ExamplePOST with variables.

Documentation

Clean examples for your docs.

ExampleFormatted .graphql file.

Learning GraphQL

See how variables and fragments fit.

Example$id: ID! in use.

Moving from REST

Turn a JSON response into fields.

ExamplePaste the response body.

Teams

Share a query that runs first time.

ExamplePaged list with cursors.

GraphQL tips

Queries servers like

Ask only for what you show

Every extra field costs time on the server and bytes on the phone.

Always use variables

Variables keep queries cacheable and stop string-building bugs.

Page long lists

Use first and after with pageInfo instead of loading everything.

Reuse with fragments

Put the fields a card needs in one fragment and spread it everywhere.

Format existing queries

Indent and check GraphQL.

Open GraphQL Formatter

Check a response

View and validate JSON.

Open JSON Formatter
Built & tested by

HemantInsights

Senior Software Engineer · Developer of Toolyconvert

Hemant developed GraphQL Query Builder and tests it on desktop and mobile with real files. He is a senior software engineer from Dehradun, India, building websites since 2014, and designed and developed Toolyconvert end to end.

Last updated 29 November 2026

Answers and guidanceFrequently Asked Questions
How do I nest fields?
Indent a line under the field it belongs to, with Tab or two spaces. Every level of indentation becomes a pair of braces.
Can I build mutations and subscriptions?
Yes. Choose Mutation or Subscription at the top. A subscription may have only one root field, and the tool says so.
How do variables work?
Add them under Variables with a type, use them in the fields as $name, and the tool declares them in the operation and shows test values as JSON.
Can it make the fields from a JSON response?
Yes. Choose From a JSON response and paste the body; every field is listed, nested as in the response.
Does it support fragments?
Yes: spreads like ...UserCard with the definition in the Fragments box, and inline fragments like ... on Photo.
Does it send the query to my API?
No. It writes the query and code only; you run them yourself.
Is my data uploaded?
No. Everything stays in your browser.
More tools for your workflowRelated Tools

GraphQL Formatter

Format or minify GraphQL queries, mutations, fragments and schemas. Comments kept, clear indentation, and broken brackets or strings shown with line and column. No upload.

JSON Formatter

Format, validate and minify JSON: 2 spaces, 4 spaces or tabs, sort keys, see the exact line and column of errors, fix trailing commas and quotes, copy or download.

OpenAPI Viewer

Read an OpenAPI 3 or Swagger 2 file in JSON or YAML as a clear list of endpoints: parameters, request bodies with examples, responses, schemas, curl commands, and spec checks.

JSON to TypeScript Converter

Paste JSON and get TypeScript interfaces or types: nested interfaces, optional keys, unions and quoted keys. Updates as you type.

1 / 3
Browse all developer tools

Featured on

Toolyconvert is listed on these product directories and launch platforms.