Skip to content

Commit f2552ac

Browse files
committed
Replace 203 status code with 294
1 parent 313cebd commit f2552ac

File tree

1 file changed

+14
-19
lines changed

1 file changed

+14
-19
lines changed

spec/GraphQLOverHTTP.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -672,13 +672,13 @@ Note: There are no circumstances where the GraphQL specification allows for a
672672
response having {data} as {null} without {errors} being present.
673673

674674
If the _GraphQL response_ contains both the {data} entry (even if it is {null})
675-
and the {errors} entry, then the server SHOULD reply with `203` status code.
675+
and the {errors} entry, then the server SHOULD reply with `294` status code.
676676

677677
Note: The result of executing a GraphQL operation may contain partial data as
678678
well as encountered errors. Errors that happen during execution of the GraphQL
679679
operation typically become part of the result, as long as the server is still
680680
able to produce a well-formed _GraphQL response_. For details of why status code
681-
`203` is recommended, see [Partial success](#sec-Partial-success). Using `4xx`
681+
`294` is recommended, see [Partial success](#sec-Partial-success). Using `4xx`
682682
and `5xx` status codes in this situation is not appropriate - since no _GraphQL
683683
request error_ has occurred it is seen as a "partial response" or "partial
684684
success".
@@ -797,23 +797,18 @@ appropriate; since no _GraphQL request error_ has occurred it is seen as a
797797
"partial response" or "partial success".
798798

799799
There's currently not an approved official HTTP status code to use for a
800-
"partial success," contenders include "206 Partial Content" (which requires the
801-
`Range` header), WebDAV's status code "207 Multi-Status", and using a custom
802-
code such as "294 Partial Success."
803-
804-
[IETF RFC2616 Section 6.1.1](https://datatracker.ietf.org/doc/html/rfc2616#section-6.1.1)
805-
states "codes are fully defined in section 10" implying that though more codes
806-
are expected to be supported over time, valid codes must be present in this
807-
document. For compatibility reasons, using HTTP status `203` which has no
808-
additional requirements seems to work the best with intermediate servers and
809-
clients, but since it does not semantically line up we only recommend its usage
810-
alongside the `application/graphql-response+json` media type which makes the
811-
meaning explicit. We hope to one day move to `294` if someone can push it
812-
through the IETF review process.
813-
814-
Note: This use of HTTP 203 does not strictly align with the intended semantics
815-
of this status code, but was a pragmatic choice to maximize compatibility whilst
816-
allowing servers to indicate partial success such that intermediaries that do
800+
"partial success". Contenders include "203 Non-Authorative information" (which
801+
indicates the response has been transformed), "206 Partial Content" (which
802+
requires the `Range` header), and WebDAV's status code "207 Multi-Status" (which
803+
"provides status for multiple _independent_ operations"). None of those quite
804+
fit GraphQL's needs, so we recommend using custom code "294 Partial Success".
805+
Since we are defining the code ourselves, rather than the IETF, we only
806+
recommend its usage alongside the `application/graphql-response+json` media type
807+
which makes the meaning explicit.
808+
809+
Note: This status code is not to help clients, who should ignore the status code
810+
of a response when receiving the `application/graphql-response+json` media type,
811+
but allows servers to indicate partial success such that intermediaries that do
817812
not implement this specification may still track the not-fully-successful
818813
request (for example, for observability).
819814

0 commit comments

Comments
 (0)