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

Query, mutation or subscription.
Name, type, required, list.
Indent to nest them.
Query, variables, fetch or curl.
Indentation becomes nesting.
With test values as JSON.
Fields listed for you.
Spreads and inline fragments.
Undeclared or unused variables.
fetch, curl, Apollo, JSON.
From first query to production code
Write the query a screen needs.
ExampleUser with five recent posts.
curl command in one click.
ExamplePOST with variables.
Clean examples for your docs.
ExampleFormatted .graphql file.
See how variables and fragments fit.
Example$id: ID! in use.
Turn a JSON response into fields.
ExamplePaste the response body.
Share a query that runs first time.
ExamplePaged list with cursors.
Queries servers like
Every extra field costs time on the server and bytes on the phone.
Variables keep queries cacheable and stop string-building bugs.
Use first and after with pageInfo instead of loading everything.
Put the fields a card needs in one fragment and spread it everywhere.
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
Featured on
Toolyconvert is listed on these product directories and launch platforms.