GraphQL Query Builder
Visually build GraphQL queries, mutations, and subscriptions. Add fields, aliases, arguments, and nested selections.
query {
user
}Tips
• Toggle scalar / { } to make a field a nested selection set
• Use +arg to add arguments like id: $id or limit: 10
• Set an alias to rename the field in the response
• Use Variables to declare operation-level variables (e.g. $id: ID!)
About the GraphQL Query Builder
GraphQL queries are powerful but verbose to write by hand — especially when you're exploring an unfamiliar schema or building a complex nested selection. This visual builder lets you construct queries, mutations, and subscriptions by adding fields, arguments, aliases, and variables through a point-and-click interface, then copies the formatted GraphQL string ready to paste into your application or GraphQL playground.
What this tool builds
Queries & Mutations
Build read queries and write mutations with nested field selections, operation names, and variable declarations.
Arguments
Add arguments to any field — static values like limit: 10 or variable references like id: $id.
Aliases
Rename fields in the response to avoid conflicts when querying the same field multiple times with different arguments.
Nested Objects
Toggle any field between scalar and object type to add a nested selection set — mirrors the recursive nature of GraphQL schemas.
GraphQL vs REST
REST APIs return fixed response shapes — you get all fields whether you need them or not. GraphQL lets the client specify exactly which fields to fetch, eliminating over-fetching and under-fetching. A single GraphQL request can replace multiple REST calls by traversing relationships in one query.
Pipeline
- JSON Formatter — pretty-print the JSON response from your GraphQL endpoint.
- cURL to Code — convert a GraphQL cURL request to your language of choice.
Privacy
All query building runs in your browser. Schema and field data are never transmitted. Read our privacy policy.
Frequently asked
- Is my GraphQL query sent to a server?
- No. The query builder runs 100% in your browser. No schema data, field names, or query strings are transmitted anywhere.
- What is the difference between a query, mutation, and subscription?
- A query reads data (equivalent to HTTP GET). A mutation writes or modifies data (equivalent to POST/PUT/DELETE). A subscription establishes a real-time connection and receives data pushed from the server when events occur.
- What are GraphQL variables?
- Variables let you parameterize a query so the same operation can be reused with different inputs. Declare them in the operation signature (e.g. $id: ID!) and reference them in arguments (e.g. id: $id). This is safer than string interpolation and enables query caching.
- What is a field alias in GraphQL?
- An alias renames a field in the response. For example, "adminUser: user(id: 1)" returns the result under the key "adminUser" instead of "user". Aliases are required when querying the same field multiple times with different arguments.
- What are GraphQL fragments?
- Fragments are reusable selections of fields that can be included in multiple queries. They reduce duplication and keep queries maintainable. Define a fragment with "fragment UserFields on User { id name email }" and include it with "...UserFields".