On this page
For eleven years GraphQL ran over HTTP on conventions. The 2016 “Serving over HTTP” page on graphql.org said roughly how to send a query, and everyone filled in the rest: most servers answered 200 OK for everything, errors included, because a non-200 status might have come from a proxy rather than from GraphQL. Monitoring tools could not tell a failed query from a successful one without reading the body.
On 12 November the GraphQL Technical Steering Committee published the first edition of the GraphQL over HTTP specification, named the September 2026 edition. It adds a media type, application/graphql-response+json, and with it a full set of status codes, including a new 294 Partial Success. I ran six popular servers with their default settings against it, sent each the same 22 requests, and compared the answers with the text. This article covers what the specification requires, which servers already follow it, and what to change in clients, servers and the infrastructure in between.
What the specification settles
The specification is a supplement to the GraphQL specification, which stays transport-agnostic. It covers the URL, GET and POST requests, JSON encoding, headers and status codes. Subscriptions are not covered; the HTTP QUERY method, persisted documents and request batching are planned for later editions.
| Topic | What the September 2026 edition says |
|---|---|
| Request | A server MUST accept POST with a JSON body (query, optional operationName, variables, extensions); GET is optional. Unknown body properties MUST be ignored. |
| Response media type | A server MUST support application/graphql-response+json. A server that does not is a legacy server and does not conform. |
| Accept | A client MUST list application/graphql-response+json; if unsure of the server, send application/graphql-response+json, application/json;q=0.9. The server MUST answer in the highest-priority type it supports. |
| Data returned | data present and not null: MUST be 2xx; 200 when there are no errors. |
| Partial success | data and errors together: SHOULD be 294. |
| Request errors | No data: MUST be 4xx or 5xx, with specific codes recommended (next table). |
| Mutations over GET | MUST be refused with a 4xx and not executed; 405 is recommended, which requires an Allow header. |
| Non-GraphQL failures | When no GraphQL response can be produced, use a 4xx or 5xx and MUST NOT use application/graphql-response+json. |
The new media type is what makes honest status codes safe. A client that receives application/graphql-response+json knows the body is a GraphQL response whatever the status, so a 422 from GraphQL can no longer be confused with a 422 from a gateway. Clients are told to read the body and ignore the status code; the status code is for everything in between: logs, gateways, dashboards and intrusion detection.
| Condition | Recommended status |
|---|---|
| Body is not valid JSON | 400 |
Not a well-formed request (e.g. qeury, variables as an array) | 422 |
| GraphQL document does not parse | 400 |
| Document fails validation | 422 |
Operation cannot be determined (several operations, no operationName) | 422 |
| Variables cannot be coerced | 422 |
| Mutation over GET, or unsupported HTTP method | 405 |
Unsupported Content-Type | 415 |
| No acceptable response media type | 406 |
| Not authenticated or not allowed | 401, 403 |
| Server overloaded or in maintenance | 503 |
| Executed, with field errors | 294 |
There is no registered HTTP status for “partial success”: 203, 206 and 207 each mean something else. The specification defines 294 Partial Success itself and recommends it only together with application/graphql-response+json. HTTP clients that do not know 294 must treat it as 200, but the specification warns that infrastructure with fixed lists of status codes (caches, load balancers, WAFs) may handle it differently, so test every hop.
The Status Codes section says a result with both data and errors SHOULD get 294. The worked example “Field errors encountered during execution” a few lines later still says the server SHOULD respond 200 OK. Both are 2xx, so either is allowed; 294 is the newer intent (it was adopted in April 2026), but expect implementations to differ until an erratum settles it.
How a client should read a response

%%{init: {'theme':'base','themeVariables':{'primaryColor':'#FFF3E0','primaryTextColor':'#232F3E','primaryBorderColor':'#FF9900','lineColor':'#232F3E','clusterBkg':'#F8FAFC','clusterBorder':'#CBD5E1','edgeLabelBackground':'#FFFFFF','nodeTextColor':'#232F3E'}}}%%
flowchart TD
A["HTTP response"] --> B{"Content-Type?"}
B -->|"application/graphql-response+json"| C["GraphQL result, any status code"]
B -->|"application/json"| D{"Status 2xx?"}
D -->|"Yes"| C
D -->|"No"| E["Cannot tell who sent it: transport error"]
B -->|"anything else"| E
C --> F{"data and errors?"}
F -->|"data only"| G["Success (200)"]
F -->|"data and errors"| H["Partial success (294)"]
F -->|"errors only"| I["Request error (4xx/5xx)"]The sample’s client follows that path. It sends the recommended Accept header, reads application/graphql-response+json at any status, reads application/json only on 2xx, and turns everything else into a transport error. For legacy servers that answer validation errors with 400 and application/json, there is an opt-in to read those bodies when you control every hop in front of the server.
"""A GraphQL-over-HTTP client that reads responses the way the September 2026 edition says.
- Send Accept: application/graphql-response+json, application/json;q=0.9
- application/graphql-response+json: a GraphQL response, whatever the status code.
- application/json: a GraphQL response only when the status is 2xx (legacy servers).
- Anything else (a proxy's 502 page, a rate limiter's 429): a transport error.
Servers that never send application/graphql-response+json (legacy servers) often answer a
validation error with 400 and application/json. The spec says a client cannot know such a body
came from GraphQL, so by default it is a transport error. If you know every hop in front of the
server, trust_json_errors=True reads those bodies too, when they have the shape of a GraphQL result.
"""
from __future__ import annotations
from dataclasses import dataclass, field
from typing import Any
import httpx
GQL = "application/graphql-response+json"
JSON = "application/json"
ACCEPT = f"{GQL}, {JSON};q=0.9"
class TransportError(Exception):
"""The response did not come from a GraphQL server, or could not be read as one."""
def __init__(self, status: int, content_type: str, message: str) -> None:
super().__init__(f"HTTP {status} ({content_type or 'no content type'}): {message}")
self.status = status
self.content_type = content_type
@dataclass
class Result:
data: dict[str, Any] | None
errors: list[dict[str, Any]] = field(default_factory=list)
extensions: dict[str, Any] | None = None
status: int = 200
@property
def partial(self) -> bool:
"""Executed, with some fields failing: data and errors together (status 294 when the server follows the spec)."""
return self.data is not None and bool(self.errors)
@property
def request_error(self) -> bool:
"""Not executed at all: parse, validation or variable errors."""
return self.data is None and bool(self.errors)
class GraphQLHTTPClient:
def __init__(self, url: str, client: httpx.Client | None = None, timeout: float = 10.0,
trust_json_errors: bool = False) -> None:
self.url = url
self._client = client or httpx.Client(timeout=timeout)
self.trust_json_errors = trust_json_errors
def execute(self, query: str, variables: dict[str, Any] | None = None,
operation_name: str | None = None) -> Result:
body: dict[str, Any] = {"query": query}
if variables is not None:
body["variables"] = variables
if operation_name is not None:
body["operationName"] = operation_name
response = self._client.post(self.url, json=body, headers={"accept": ACCEPT})
return self.read(response, self.trust_json_errors)
@staticmethod
def read(response: httpx.Response, trust_json_errors: bool = False) -> Result:
media = response.headers.get("content-type", "").split(";")[0].strip().lower()
status = response.status_code
legacy_error = media == JSON and 400 <= status < 500 and trust_json_errors
if media == GQL or (media == JSON and 200 <= status < 300) or legacy_error:
try:
payload = response.json()
except ValueError as exc:
raise TransportError(status, media, "body is not JSON") from exc
if not isinstance(payload, dict) or ("data" not in payload and "errors" not in payload):
raise TransportError(status, media, "body is not a GraphQL response")
return Result(payload.get("data"), payload.get("errors") or [], payload.get("extensions"), status)
raise TransportError(status, media, response.text[:200])Six servers against the specification
Each server ran its default HTTP stack with the same schema: hello, user(id), a boom field that always throws (to produce partial results) and a setGreeting mutation. Versions are the newest stable releases published before 24 November: graphql-http 1.23.1 (the reference implementation in the GraphQL organisation), GraphQL Yoga 6.1.1, Apollo Server 5.5.2, Mercurius 16.12.2 on Fastify, all on graphql-js 16.15.0, and Strawberry 0.341.3 and Ariadne 1.1.1 on graphql-core 3.3.2.
| Request | graphql-http | GraphQL Yoga | Apollo Server | Mercurius | Strawberry | Ariadne |
|---|---|---|---|---|---|---|
| A1 POST, Accept graphql-response+json | 200 gql ✅ | 200 gql ✅ | 200 gql ✅ | 200 json ❌ | 200 json ❌ | 200 json ❌ |
| A2 POST, Accept application/json (legacy client) | 200 json ✅ | 200 json ✅ | 200 json ✅ | 200 json ✅ | 200 json ✅ | 200 json ✅ |
| A3 POST, Accept both, graphql-response+json preferred | 200 gql ✅ | 200 gql ✅ | 200 gql ✅ | 200 json ❌ | 200 json ❌ | 200 json ❌ |
| A4 POST, no Accept header | 200 json · | 200 json · | 200 json · | 200 json · | 200 json · | 200 json · |
| A5 POST, Accept text/html only | 406 none ✅ | 406 none ✅ | 406 json ✅ | 200 json ⚠️ | 200 json ⚠️ | 200 json ⚠️ |
| B1 POST, Content-Type text/plain | 415 none ✅ | 415 none ✅ | 400 gql ⚠️ | 400 json ⚠️ | 400 text ⚠️ | 400 text ⚠️ |
| B2 POST, no Content-Type | 415 none ✅ | 415 none ✅ | 400 gql ✅ | 415 json ✅ | 400 text ✅ | 400 text ✅ |
| B3 POST, body is not JSON | 400 json ✅ | 400 gql ✅ | 400 html ✅ | 400 json ✅ | 400 text ✅ | 400 text ✅ |
| B4 POST, misspelt parameter (qeury) | 400 json ⚠️ | 400 gql ⚠️ | 400 gql ⚠️ | 400 json ⚠️ | 400 text ⚠️ | 400 json ⚠️ |
| B5 POST, variables is an array | 400 json ⚠️ | 400 gql ⚠️ | 400 gql ⚠️ | 400 json ⚠️ | 400 text ⚠️ | 400 json ⚠️ |
| B6 POST, unknown top-level property | 200 gql ✅ | 400 gql ❌ | 200 gql ✅ | 200 json ✅ | 200 json ✅ | 200 json ✅ |
| C1 Document does not parse | 400 gql ✅ | 400 gql ✅ | 400 gql ✅ | 400 json ✅ | 200 json ⚠️ | 400 json ✅ |
| C2 Validation error (unknown field) | 400 gql ⚠️ | 400 gql ⚠️ | 400 gql ⚠️ | 400 json ⚠️ | 200 json ⚠️ | 400 json ⚠️ |
| C3 Two operations, no operationName | 400 gql ⚠️ | 400 gql ⚠️ | 400 gql ⚠️ | 200 json ⚠️ | 200 json ⚠️ | 400 json ⚠️ |
| C4 Required variable missing | 200 gql ❌ | 400 gql ⚠️ | 400 gql ⚠️ | 200 json ⚠️ | 200 json ⚠️ | 400 json ⚠️ |
| C5 Partial result (data and errors) | 200 gql ⚠️ | 200 gql ⚠️ | 200 gql ⚠️ | 200 json ⚠️ | 200 json ⚠️ | 200 json ⚠️ |
| C6 Validation error, legacy Accept application/json | 200 json ⚠️ | 200 json ⚠️ | 400 json ⚠️ | 400 json ⚠️ | 200 json ⚠️ | 400 json ⚠️ |
| D1 GET query | 200 gql ✅ | 200 gql ✅ | 400 gql · | 200 json ✅ | 200 json ✅ | 200 html · |
| D2 GET mutation | 405 none ✅ | 405 gql ✅ | 400 gql ⚠️ | 405 json ❌ | 400 text ⚠️ | 200 html · |
| D3 PUT | 405 none ✅ | 405 gql ✅ | 405 gql ✅ | 404 json ⚠️ | 405 text ✅ | 405 none ✅ |
| D4 GET query + apollo-require-preflight | 200 gql ✅ | 200 gql ✅ | 200 gql ✅ | 200 json ✅ | 200 json ✅ | 200 html · |
| D5 GET mutation + apollo-require-preflight | 405 none ✅ | 405 gql ✅ | 405 gql ✅ | 405 json ❌ | 400 text ⚠️ | 200 html · |
| MUST broken / SHOULD differs | 1 / 6 | 1 / 7 | 0 / 9 | 4 / 10 | 2 / 12 | 2 / 9 |
Key: ✅ as specified, ⚠️ allowed but not what the specification recommends (a SHOULD), ❌ breaks a MUST, · left open. gql is application/graphql-response+json, json is application/json. D4 and D5 repeat the GET requests with Apollo’s preflight header.

Three servers do not speak the new media type
graphql-http, Yoga and Apollo Server answered application/graphql-response+json when asked and fell back to application/json for a legacy Accept. Mercurius, Strawberry and Ariadne answered application/json to every request, including one that asked only for the new type. Under the new edition that makes them legacy servers: supporting the media type is a MUST. They still work for clients that send application/json;q=0.9 as a fallback, which is why the specification recommends that header.
Nobody uses 422 or 294 yet
Every server answered validation errors, ambiguous operations and bad variables with 400 (or 200), and every partial result with 200. Both recommendations are new: 422 and 294 entered the draft in April 2026, and graphql-http 1.23.1 was released on 28 September, before the edition. graphql-http’s own audit suite, which tests the draft’s earlier expectations, passes all 61 checks against graphql-http and Yoga. Expect status codes to change in the next releases of these libraries, and treat that as a behaviour change for dashboards and alerts.
The MUST-level findings
- graphql-http answered a missing required variable with
200andapplication/graphql-response+json, witherrorsand nodata. A result without data MUST get a4xxor5xx; the same server answered a validation error correctly with400. - GraphQL Yoga refused a request with an extra top-level property (
"trace": true) with400 Unexpected parameter "trace" in the request body. The specification says servers MUST ignore properties they do not understand, so that new request properties can be added later. - Mercurius refused a mutation over GET with
405but sent noAllowheader, which RFC 9110 requires with 405. graphql-http’s audit also flagged it for rejecting"extensions": null. - Mercurius, Strawberry and Ariadne never send
application/graphql-response+json(above).
Other behaviour worth knowing
- Apollo Server’s CSRF prevention refused every GET and the
text/plainPOST with400, before looking at the operation, because a browser can send those without a CORS preflight. With itsapollo-require-preflightheader the same GET query succeeded and the GET mutation got405. This is the pattern the specification’s security notes describe; budget for the extra header in clients that use GET. - Ariadne answered GET requests with the GraphiQL page, even when the client asked for
application/graphql-response+json, so it does not serve queries over GET by default. That is allowed (GET is optional), but caching proxies will not get GraphQL responses from it. - Strawberry answered a document that does not parse and a validation error with
200. Strawberry and Mercurius also included"data": nullin request-error results; the GraphQL specification saysdatashould not be present when an error happens before execution, and with the new status rules adataentry changes the expected status from4xxto294. - A strict client cannot read legacy validation errors. Mercurius and Ariadne answer an unknown field with
400andapplication/json. A client that follows the specification cannot tell that body from a proxy’s error, so it reports a transport error and the GraphQL message is lost. That is the case the client’strust_json_errorsoption exists for.
What to change
| Where | Change |
|---|---|
| Clients | Send Accept: application/graphql-response+json, application/json;q=0.9. Decide by media type, then status. Treat 294 as success with errors, not as an error. |
| Servers | Upgrade to releases that support application/graphql-response+json, and plan for the switch to 422 and 294. Keep application/json for legacy clients; the specification says 2xx answers to them keep that type. Ignore unknown body properties. |
| GET | Refuse mutations with 405 and an Allow header. Require a preflight-forcing header if GET is enabled for browsers. |
| Gateways, CDNs and WAFs | Check that 294 is passed through, logged and not cached or rewritten unexpectedly. Stop rewriting GraphQL 4xx bodies into generic error pages: the media type marks them as GraphQL. |
| Monitoring | Split dashboards by status: 2xx success, 294 partial, 4xx client errors, 5xx server errors. Alert on rates, now that a failed query is no longer a 200. |
| Testing | Add a conformance probe like the sample’s to CI so a library upgrade that changes status codes is noticed before production. |
Key takeaways
- The September 2026 edition makes
application/graphql-response+jsonmandatory for servers and lets status codes carry meaning: 200, 294, 400, 422, 405, 415, 406. - Clients should read the media type first:
application/graphql-response+jsonis GraphQL at any status;application/jsononly on 2xx. - Three of six servers tested already speak the media type; none uses 422 or 294 yet, not even the reference implementation released before the edition.
- Four MUST-level gaps showed up with default settings: 200 for a result without data, refusing an unknown body property, 405 without
Allow, and no support for the media type. - 294 is new to every proxy, CDN and dashboard; test each hop before servers start sending it.
Which status code change will hit your dashboards first: 422 for validation errors or 294 for partial results? Let me know in the comments.
For the broader choice between API styles, see GraphQL vs gRPC vs REST.
The specification text was read from the September2026 tag of the graphql/graphql-over-http repository; dates of the 422 and 294 changes come from its commit history. The six servers ran locally on Linux with Node 22 and Python 3.13, each with its default HTTP settings and the same schema, using the newest stable releases published before 24 November 2026. The probe sent 22 requests to each server once; the table is its output. graphql-http’s serverAudits ran against each server as a second check. The client’s 12 tests use a mocked transport and were also run against the six servers. Hot Chocolate, graphql-java and gqlgen were not tested.
Glossary
- GraphQL over HTTP
- The specification, separate from the GraphQL specification, for sending GraphQL requests and responses over HTTP; first edition September 2026.
- application/graphql-response+json
- The response media type that marks a body as a GraphQL response following the specification, whatever the status code.
- Legacy server
- A server that does not support
application/graphql-response+json; it does not conform to the specification. - Legacy client
- A client that only accepts
application/json; servers answer it with that type on 2xx. - Request error
- An error before execution (parse, validation, variable coercion, operation selection); the result has no
dataentry. - Execution (field) error
- An error while resolving a field; the result has
data, possibly with nulls, anderrors. - 294 Partial Success
- A status code defined by the specification, not by IANA, for results with both data and errors.
- Well-formed request
- A request whose parameters have the right names and types; the document does not have to parse.
- CSRF preflight header
- A custom header, such as Apollo’s
apollo-require-preflight, that forces browsers to send a CORS preflight before the request.
The complete sample for this article is on GitHub: nithinmohantk/blog-samples-working-repo/graphql-over-http-conformance. Clone it with git clone https://github.com/nithinmohantk/blog-samples-working-repo.git and open the graphql-over-http-conformance folder. Its README says how to run it and what has been verified.
References & Further Reading
- → GraphQL over HTTP, September 2026 edition— The specification
- → Announcing the GraphQL over HTTP specification— GraphQL TSC, 12 November 2026
- → graphql/graphql-over-http on GitHub— Source, September2026 tag and changelog
- → graphql-http— Reference implementation and audit suite
- → RFC 9110: HTTP Semantics— Status codes, Accept and the Allow header
- → Sample code for this article— Servers, probe, audits, client and results
Discover more from C4: Container, Code, Cloud & Context
Subscribe to get the latest posts sent to your email.