// graphql

GraphQL

Write queries with schema-aware autocompletion, or build them by ticking fields in the Explorer. Subscriptions stream live over WebSocket from the same tab.

What It Does

  • Query editor with syntax highlighting, autocompletion once a schema is loaded, and a Format button
  • Loads the schema by introspection, automatically or on demand, and caches it per URL
  • Explorer — a schema tree you click to build queries, with arguments edited inline as real $variables
  • Queries, mutations, and subscriptions (over graphql-transport-ws)
  • Highlights a GraphQL Errors (n) badge when a response carries an errors array
  • Uses the request’s headers, authorization, client certificate, and TLS settings — including for introspection

Creating a GraphQL Request

  1. Click + in the workspace tab bar and choose GraphQL — or, in a collection, pick GraphQL as the Protocol in the Create New Request dialog
  2. Enter the endpoint, e.g. https://api.example.com/graphql. GraphQL requests are always sent as POST, so there is no method selector
  3. Write the query in the Body tab, or build it in the Explorer
  4. Click Send

A GraphQL tab shows the Body, Headers, Authorization, and Scripts tabs. {{variables}} are substituted in both the query and the variable values. If the document defines several named operations, an Operation to run selector appears and the chosen name is sent as operationName.

Loading the Schema

  • Automatically — when you switch a tab to GraphQL, open a saved GraphQL request, or finish editing the URL (Enter or leaving the field). Background fetches run once per URL per session and fail silently
  • Manually — click the Schema button to run introspection now; errors such as disabled introspection are reported
  • Schemas are cached per URL (up to 50), so reopening a request reuses the schema without a network call

Building Queries in the Explorer

The Explorer rail opens next to the editor in GraphQL mode; toggle it with the Explorer button and drag its edge to resize. It lists the schema’s Query, Mutation, and Subscription roots.

  1. Expand a type with its chevron, and tick a field to add it to the query — unticking removes it (and the whole operation once it is empty)
  2. Ticking an object field also selects its scalar and enum fields, so you get a useful query in one click
  3. Fields tagged ARG take arguments. Once ticked, each argument gets an inline input: a checkbox for booleans, a dropdown for enums, a number field for Int/Float, text for strings and IDs, and JSON for lists and input objects
  4. Each argument value becomes a real variable — e.g. country(code: $code) with $code: ID! declared on the operation — and is sent in the request’s variables. Required arguments are bound as soon as you tick the field; optional ones when you type a value, and they are removed again when you clear it
  5. Use Search fields to filter the expanded tree by name

The query text stays the source of truth: edit it by hand and the checkboxes follow. Fragments, aliases, and directives you write are preserved. While the query has a syntax error the Explorer is read-only until you fix it. Variable values are saved with the tab and the collection request — there is no separate variables pane.

Subscriptions

  1. Write or build a subscription operation
  2. Click Send — Resonance opens a WebSocket to the same URL (http becomes ws, https becomes wss) using the graphql-transport-ws protocol
  3. Events stream into the response body as a transcript (CONNECTED, ACK, DATA, ERROR, COMPLETE…)
  4. Click Send again to stop it

The request’s headers — including auth — go into the connection_init message, both as payload.headers and as a top-level Authorization, which covers Hasura- and Apollo-style servers. An open subscription counts as a live connection in the status bar. Subscriptions are not written to request history.

History

Sent queries and mutations appear in the request history and reopen as GraphQL tabs, named after the operation, with the URL, query, variables, operation name, and headers restored. Authorization is not restored — set it again before sending.

Troubleshooting

The Explorer says to load the schema

  • Click Schema. If it reports that the response has no schema, introspection is disabled on the server — you can still write queries by hand
  • Check that the headers and authorization the server needs for introspection are set on the request

Subscription closes immediately

  • The server must support the graphql-transport-ws protocol; the legacy subscriptions-transport-ws protocol is not supported
  • Check the auth the server expects in connection_init

Next Steps