/ Feature — GraphQL

GraphQL answers 200 even when the query failed

Errors live in the response body, not in the status code. Assert sends the query and the variables, requires the errors array to be empty, and asserts on the resolved data underneath.

/ The same response, read twice

An uptime monitor calls this a success

query.graphql
query GetUser($id: ID!) {
user(id: $id) {
id
email
status
subscription { plan expiresAt }
}
}
# variables
{ "id": "usr_12345" }
Response — HTTP 200
{
"errors": [
{ "message": "User not found", "path": ["user"] }
],
"data": null
}
UPTIME MONITOR SEES
HTTP 200. Endpoint healthy.
ASSERT SEES
errors is not empty. Check failed.
/ How you write a GraphQL check

One clause for the errors, the rest for the data

errors is empty AND data.user.subscription.plan == "pro" → errors returned 1 entry, HTTP 200
errors isEmpty

The first assertion on every GraphQL monitor. A single entry in the errors array fails the check, whatever the status code says.

data.* equals

Assert on the resolved fields: a plan, a status, a count, a price.

data.* exists

Catch a resolver that returns null for a field the client treats as required.

p95 lessThan

A latency budget for the whole operation, per region. A resolver that drifts past it fails the check in that region before your users report it.

/ Queries worth watching

Where GraphQL fails quietly

Authentication mutations

Assert that the login mutation returns a token and a user, not an errors array with a 200 beside it.

Primary data queries

An empty list and a null data object both come back as 200. Assert on the row count behind your main screen.

Partial resolver failure

GraphQL can return data and errors together. Assert fails the check when either half is wrong.

Schema changes

A renamed field resolves to null. The assertion on that path catches it the first time it runs.

Subscription setup

Run the initialisation query as a monitor. When it breaks, the real-time feature on top of it stops delivering.

Rate limiting

Watch for the rate-limit error your consumers hit, in the errors array where it lands.

Assert the errors array.

Five monitors, thirty-second checks, no card, no call.