@@ -672,13 +672,13 @@ Note: There are no circumstances where the GraphQL specification allows for a
672
672
response having {data} as {null} without {errors} being present.
673
673
674
674
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.
676
676
677
677
Note: The result of executing a GraphQL operation may contain partial data as
678
678
well as encountered errors. Errors that happen during execution of the GraphQL
679
679
operation typically become part of the result, as long as the server is still
680
680
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 `
682
682
and ` 5xx ` status codes in this situation is not appropriate - since no _ GraphQL
683
683
request error_ has occurred it is seen as a "partial response" or "partial
684
684
success".
@@ -797,23 +797,18 @@ appropriate; since no _GraphQL request error_ has occurred it is seen as a
797
797
"partial response" or "partial success".
798
798
799
799
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
817
812
not implement this specification may still track the not-fully-successful
818
813
request (for example, for observability).
819
814
0 commit comments