GraphQL
HTTPBot has first-class support for GraphQL. Instead of hand-writing a JSON body, you get a dedicated editor with a separate query and variables editor, schema-aware autocomplete, a built-in schema browser so you can explore an API's types without leaving the request, and saved queries you can reuse across requests.
GraphQL is one of the request body types — everything below lives in the request's Body section.
Try it. The examples below run against the public PokéAPI GraphQL endpoint,
https://beta.pokeapi.co/graphql/v1beta. Point a request there to follow along — it's a free, read-only API, so HTTPBot can fetch its schema for autocomplete and run the queries as-is.
Enabling GraphQL
Turn a request into a GraphQL request in either of two ways:
- Open the request
…menu and choose Use GraphQL, or - In the Body section, pick GraphQL from the Type picker.
Because GraphQL is sent as a POST, switching a GET, HEAD, or DELETE request to
GraphQL flips its method to POST automatically. Once enabled, the Body section
shows two rows — Query and Variables — that open the editor.
The query editor
Tap Query (or Variables) to open the full-screen GraphQL editor. It's a syntax-highlighted code editor with a tab switcher at the bottom for moving between the Query and Variables panes.



- Query — your GraphQL query or mutation.
- Variables — a JSON object whose keys match the variables declared in your query.
You can optionally provide an operation name when a document defines more than one operation.
A query with variables:
query GetPokemon($limit: Int!) {
pokemon_v2_pokemon(limit: $limit) {
id
name
height
weight
}
}
The matching Variables JSON:
{
"limit": 5
}
How it's sent
When you send the request, HTTPBot serializes the query, variables, and operation
name into a single JSON body and posts it as application/json:
{
"query": "query GetPokemon($limit: Int!) { ... }",
"variables": { "limit": 5 },
"operationName": "GetPokemon"
}
Schema-aware autocomplete
When the editor opens, HTTPBot fetches the API's schema by running an introspection query against the request's URL — no extra configuration. The editor uses that schema to power autocomplete and validation as you type, so it can suggest fields and arguments and flag references that don't exist in the schema. If the schema can't be fetched (for example the endpoint blocks introspection), the editor still works as a plain code editor.
Browsing the schema
To explore the API without leaving the request, open the editor's … menu and
choose View Schema. HTTPBot fetches the schema from the request URL and opens
the GraphQL Schema browser.
From there you can drill into the API:
- Root Types — the Query, Mutation, and Subscription entry points.
- Tap a type to see its Fields, Input Fields, Possible Types, and Enum values, along with the type's description.
- Tap a field to see its type, its arguments, and its description.
Every type reference is tappable, so you can navigate from a field to its return type and back, the same way you'd browse a GraphiQL docs panel.



Saving and reusing queries
Queries and variables you use often can be saved and reused — handy when you keep coming back to the same handful of operations against an API:
- From the editor's
…menu, choose Save Query or Save Variables to name and store the current pane's contents. - Choose Load Query or Load Variables to drop a saved one back in. Saved queries and variables are stored separately, so you can mix and match them.
- Manage your saved GraphQL queries and variables app-wide from Settings → GraphQL, where the Queries and Variables tabs each list what you've saved.



Mutations
Mutations work exactly like queries — write the mutation in the Query editor and supply its inputs in Variables. The public PokéAPI endpoint is read-only, so the shape below is just for illustration; point the request at a write-capable API to actually run one:
mutation CreateUser($input: CreateUserInput!) {
createUser(input: $input) {
id
name
}
}
Variable substitution
The GraphQL query and variables both support {{variable}} placeholders, which
HTTPBot resolves against your active environment and global variables before
sending. That lets you keep things like an API host or an auth token in an
environment and reuse the same request across setups. See
Environments & Variables for how variables are defined and
resolved.
Related pages
- Request Body — the other body types and the Type picker
- Building a Request — URL, headers, and params
- Environments & Variables —
{{variable}}substitution