Sending GraphQL requests

Query GraphQL APIs in SchemaClient: switch a request to GQL mode, write the query and variables, and inspect the response — same collections, same workflow as REST.

Updated

GraphQL endpoints do not need a different tool — they need the same workflow with a query editor where the body editor was. In SchemaClient, GraphQL is a mode on the request, not a separate app.

Switch the request to GQL

In the URL bar, flip the request type from REST to GQL and enter the endpoint URL. GraphQL APIs expose a single endpoint (usually /graphql), so the URL stays the same across every query — the query itself decides what you get back.

Write the query

The query editor takes standard GraphQL:

query GetUser($id: ID!) {
  user(id: $id) {
    id
    name
    email
    teams {
      id
      name
    }
  }
}

If the query declares variables, provide them as JSON in the variables editor:

{ "id": "42" }

Variables beat string-splicing values into the query — the same query works across environments and test cases, and you never create injection-shaped bugs while testing.

Send and read the response

Send works exactly like REST. Two GraphQL habits worth building from day one:

  • Read errors, not the status code. GraphQL returns HTTP 200 OK even when the query fails — failures arrive as an errors array in the body. A green status line means the transport worked, nothing more. (This is the GraphQL flavor of why 200 OK is not enough.)
  • Expect data and errors to coexist. A query can partially succeed: data holds what resolved, errors explains what did not.

Auth, collections and teams — unchanged

A GraphQL request saves into collections, syncs into shared workspaces, and authenticates with the same bearer/API-key/basic options as everything else. If your GraphQL API runs on your machine, the localhost tunnel exposes it like any other local server.

For the broader testing methodology — what to assert about GraphQL responses and how REST and GraphQL testing differ — see how to test a GraphQL API.

Frequently asked questions

How do I send a GraphQL query in SchemaClient?

Switch the request from REST to GQL in the URL bar, enter the endpoint URL, write your query in the query editor, add variables as JSON if the query uses them, and send. The response comes back in the same viewer as REST responses.

Do GraphQL requests work with collections and auth?

Yes. A GraphQL request is still a request — it saves into collections, lives in workspaces, and uses the same auth options (bearer tokens, API keys, basic auth) as REST requests.

Why does my GraphQL API return 200 OK for a failing query?

GraphQL transports errors in the response body, not the status code — a failed query usually still returns HTTP 200 with an errors array. Check the errors field in the response, not the status line. This is normal GraphQL behavior, not a bug.