Programming

GraphQL Over HTTP Is Finally a Spec. Your Server Probably Still Says 200.

The GraphQL over HTTP specification shipped its first edition on November 12, ending the decade of '200 Not OK.' Validation errors get 422, partial results get a new 294 status, and a dedicated media type tells clients the body is safe to parse.

Ask most GraphQL servers a question they can't answer and you get back 200 OK with an errors array. Your load balancer logs a success, your error-rate dashboard stays green, and the only way to know something failed is to parse every response body. People have joked about "200 Not OK" for years because it was true.

The reason was defensive. If a proxy or CDN in the middle returned its own error page, a client that trusted any JSON body might try to parse it as a GraphQL response. So servers sent 200 for anything they produced themselves, and clients learned to treat non-200 as "not from GraphQL." On November 12 the GraphQL Technical Steering Committee published the first edition of the GraphQL over HTTP specification, the September 2026 edition, and it fixes that properly.

What the GraphQL Over HTTP Spec Changes

The core of it is a media type: application/graphql-response+json. A response with that content type is a GraphQL response, whatever its status code. That lets servers use real status codes without clients mistaking a proxy's error page for a GraphQL error.

The spec's rules, condensed:

Result Status Rule
data with no errors 200 SHOULD
data and errors both present (partial result) 294 SHOULD
data not null Any 2xx MUST
No data at all (request error) 4xx or 5xx MUST
JSON body or GraphQL document can't be parsed 400 SHOULD
Query fails validation, or variables don't fit 422 SHOULD
Mutation sent with GET 405 SHOULD
Content-Type of the request not supported 415 SHOULD
Nothing in Accept supported, and no application/json 406 SHOULD

The rule for partial results is in the spec in nearly these words: if the result "contains both the data entry (even if it is null) and the errors entry, then the server SHOULD reply with a 294 status code."

Yes, 294. The spec explains that none of the existing codes fit. 203, 206 and 207 all mean something else, so the authors defined their own: "we recommend using the custom code 294 Partial Success." It isn't registered with IANA. Under RFC 9110, a client that doesn't recognize a status code treats it as the base code of its class, so older clients will see 294 as a plain 200. The spec still warns that "294 might be handled differently from 200" by infrastructure with fixed lists of status codes, especially caches.

The spec even has a joke entry: a server that is "a short and stout ceramic vessel" SHOULD use 418.

What About Old Clients?

The spec calls a client that doesn't send the new media type in Accept a legacy client. For those, the server should still apply the new status codes. The only difference is that a 2xx response gets Content-Type: application/json instead of the new type. Errors keep their real status codes. The reasoning in the spec: intermediaries can produce 4xx and 5xx responses, "so clients typically can only rely on a response to be from GraphQL either when it is successful (HTTP 2xx) or when it explicitly declares it is a GraphQL-over-HTTP response."

We recommend reading How Authentication Actually Works to continue reading our selection of content. The spec sends 401 and 403 for requests the client isn't allowed to make, and that piece covers what has to happen before a server can decide which.

How Authentication Actually Works Authentication explained step by step: authentication vs authorization, password hashing, sessions, tokens, JWTs, OAuth and MFA in web apps. SudoSecurity · Landen

I Tested the Reference Implementation

graphql-http describes itself as "the official GraphQL over HTTP spec reference implementation," one that "follows the specification strictly." It also ships an audit suite for checking other servers. I ran the current release, 1.23.1, with graphql 17.1.0 on Node.js 22, using this server:

// A tiny GraphQL server using graphql-http, the GraphQL over HTTP reference implementation.
import http from 'node:http';
import { buildSchema } from 'graphql';
import { createHandler } from 'graphql-http/lib/use/http';

const schema = buildSchema(`
  type Query { hello: String, broken: String }
  type Mutation { bump: Int }
`);

const rootValue = {
  hello: () => 'world',
  broken: () => { throw new Error('backend timed out'); },
  bump: () => 1,
};

http.createServer(createHandler({ schema, rootValue })).listen(4000);

The broken field always throws, so asking for hello and broken together produces a partial result. Each request below sent Accept: application/graphql-response+json unless noted:

Request Spec says graphql-http 1.23.1
{ hello } 200 200
{ hello broken } (partial) 294 200
{ foo } (validation error) 422 400
{ hello (parse error) 400 400
Mutation over GET 405 405
Accept: text/html 406 406
Form-encoded body 415 415
{ foo } from a legacy client (Accept: application/json) 422 200, with application/json

The last row is the old "200 Not OK" in its original form. A legacy client sending an invalid query got a success status with only errors in the body.

Then I ran the library's own audits against the same server:

// Run graphql-http's built-in GraphQL over HTTP audits against a server.
import { serverAudits } from 'graphql-http';

const results = await Promise.all(
  serverAudits({ url: 'http://localhost:4000/graphql' }).map((audit) => audit.fn()),
);
const count = (status) => results.filter((r) => r.status === status).length;
console.log(`ok: ${count('ok')}, warn: ${count('warn')}, error: ${count('error')}`);
for (const r of results) if (r.status !== 'ok') console.log(`${r.status}: ${r.name}`);
ok: 61, warn: 0, error: 0

A perfect score. The audits check for "4xx or 5xx status codes on document validation failure," which 400 satisfies, but nothing in them mentions 422 or 294. The library's code still refers to the "watershed," a transition date from earlier drafts that the final spec dropped. In other words, the audit tool you'd use to check compliance was written against a draft and hasn't caught up with the published edition.

That's not a scandal. The spec uses SHOULD for those codes, so 400 for a validation error is allowed, and the announcement says "most GraphQL frameworks and libraries out there already support the new specification." But if you're building dashboards on top of the new status codes, check what your server actually sends. Don't assume "spec compliant" means 294 and 422.

Security Notes Worth Reading

The spec mostly defers to standard HTTP security, but its security section has one specific warning about CSRF. Body types like multipart/form-data or application/x-www-form-urlencoded let a browser send a cross-site "simple request" with no CORS preflight. The recommended application/json always triggers a preflight when sent cross-site.

My test server refused the form-encoded body with 415, which is the safe default. If your server accepts file uploads over GraphQL with multipart/form-data, the spec notes a pattern some servers use: require a custom header, such as GraphQL-Require-Preflight, which forces the browser into a preflight. It also points out that multipart uploads can let one large value be referenced many times, so the server ends up processing far more than the request size suggests.

The GET rule matters for the same reason. GET requests must never run mutations, and my server returned 405 when I tried. A server that allowed it would let any <img> tag on another site trigger a mutation.

We recommend reading Next.js Shipped Seven Advisories and Six of Them Are the Cache to continue reading our selection of content. Plenty of GraphQL endpoints live inside Next.js apps, and that piece covers this month's patches for them.

Next.js Shipped Seven Advisories and Six of Them Are the Cache Next.js patched seven advisories in November 2026: six in Cache Components, three hitting self-hosted next start. Versions and fixes. SudoSecurity · Santhdium

What to Do With It

If you run a GraphQL server: send a validation error and a partial result to it and look at the status codes. If you get 200 for both, your monitoring can't see GraphQL failures. Check your framework's changelog for spec support before changing anything by hand.

If you run proxies or caches in front of one: decide what 294 means to you. A cache that only stores 200 won't store 294, which is probably what you want for a result with errors in it. A WAF or alerting rule that treats any unknown status as an error will start firing.

If you write a client: send Accept: application/graphql-response+json, application/json;q=0.9, and when the response has the new content type, parse the body whatever the status.

What This Doesn't Cover

I tested one server library, graphql-http 1.23.1, with plain Node.js. I didn't test Apollo Server, GraphQL Yoga, Hot Chocolate, or other servers, so I can't say which already send 294 and 422. Those results also came from a test server with no proxy in front, so they don't show how any particular CDN treats 294.

The spec's announcement lists what's next: the QUERY HTTP method, standard persisted documents, and request batching. None of those are in this edition. The GraphQL September 2026 spec released the next day is a separate document and isn't covered here.

The Actual Point

GraphQL now has a rulebook for HTTP, and its biggest change is letting status codes mean what they mean everywhere else: 422 for a bad query, 294 for a partial result, 200 only for real success.

Your server is allowed to be slow about adopting the SHOULDs, but your dashboards will lie until it does. Test it with a broken query today.

The server and audit scripts are original code using graphql-http 1.23.1 and graphql 17.1.0 from npm, following the APIs shown in the graphql-http README. They were run on November 16, 2026 on Node.js 22.23.4, with requests sent by curl, and the status codes and audit counts are reproduced from those runs. Spec rules and quotes are from the GraphQL over HTTP September 2026 edition and the GraphQL TSC's November 12, 2026 announcement.

$ tail -f /forums

Discussion

Comments live on the community forums — sign in there to reply.