From 3b8760201692b55f1d651928004e0fcc6671a341 Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Thu, 2 Apr 2026 11:44:22 +0200 Subject: [PATCH 1/5] Add a note about the HTTP protocol --- spec/GraphQLOverHTTP.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/spec/GraphQLOverHTTP.md b/spec/GraphQLOverHTTP.md index c8b14751..d51b5cc1 100644 --- a/spec/GraphQLOverHTTP.md +++ b/spec/GraphQLOverHTTP.md @@ -117,6 +117,17 @@ interact with a _GraphQL service_. Note: GraphQL Subscriptions are beyond the scope of this specification at this time. +# HTTP protocol + +A server MUST support the HTTP 1.1 protocol as described in +[RFC7231](https://datatracker.ietf.org/doc/html/rfc7231). + +A server MAY support other versions of the HTTP protocol. + +This specification assumes that all versions of the HTTP protocol have "header", +"Content-Type" and "status codes". These terms are to be interpreted according +to their respective HTTP specification. + # URL A _server_ MUST enable GraphQL requests to one or more GraphQL schemas. @@ -246,8 +257,7 @@ be part of a well-formed _GraphQL-over-HTTP request_. ## Accept A client MUST indicate the media types that it supports in responses using the -`Accept` HTTP header as specified in -[RFC7231](https://datatracker.ietf.org/doc/html/rfc7231). +`Accept` HTTP header. Note: If a client does not supply the `Accept` header then the server may respond with an error, or with any content type it chooses (including serving a @@ -336,7 +346,7 @@ _GraphQL-over-HTTP request_ parameters encoded in one of the officially recognized GraphQL media types, or another media type supported by the server. A client MUST indicate the media type of a request body using the `Content-Type` -header as specified in [RFC7231](https://datatracker.ietf.org/doc/html/rfc7231). +header. A server MUST support POST requests encoded with the `application/json` media type (as indicated by the `Content-Type` header) encoded with UTF-8. From 4081cc584c888bebd69d1a5824ace7f969ec101a Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Thu, 2 Apr 2026 22:23:04 +0200 Subject: [PATCH 2/5] Reword --- spec/GraphQLOverHTTP.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/spec/GraphQLOverHTTP.md b/spec/GraphQLOverHTTP.md index d51b5cc1..21376bd8 100644 --- a/spec/GraphQLOverHTTP.md +++ b/spec/GraphQLOverHTTP.md @@ -119,14 +119,17 @@ time. # HTTP protocol -A server MUST support the HTTP 1.1 protocol as described in +A server MUST comply with +[RFC7231](https://datatracker.ietf.org/doc/html/rfc7231) semantics. In this +document, the words "header", "Content-Type" and "status code" refer to [RFC7231](https://datatracker.ietf.org/doc/html/rfc7231). -A server MAY support other versions of the HTTP protocol. +A server MUST support at least one version of the HTTP message format, such as +[1.1](https://datatracker.ietf.org/doc/html/rfc7230) or +[2.0](https://www.rfc-editor.org/rfc/rfc9113). -This specification assumes that all versions of the HTTP protocol have "header", -"Content-Type" and "status codes". These terms are to be interpreted according -to their respective HTTP specification. +A server MAY support several versions of the HTTP message format for wider +compatibility. # URL From 1b80e45918f7adb3d3fa010b43f2da57cd5d77fc Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Thu, 2 Apr 2026 22:44:12 +0200 Subject: [PATCH 3/5] Reduce diff --- spec/GraphQLOverHTTP.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/spec/GraphQLOverHTTP.md b/spec/GraphQLOverHTTP.md index 21376bd8..ecd81109 100644 --- a/spec/GraphQLOverHTTP.md +++ b/spec/GraphQLOverHTTP.md @@ -120,9 +120,7 @@ time. # HTTP protocol A server MUST comply with -[RFC7231](https://datatracker.ietf.org/doc/html/rfc7231) semantics. In this -document, the words "header", "Content-Type" and "status code" refer to -[RFC7231](https://datatracker.ietf.org/doc/html/rfc7231). +[RFC7231](https://datatracker.ietf.org/doc/html/rfc7231) semantics. A server MUST support at least one version of the HTTP message format, such as [1.1](https://datatracker.ietf.org/doc/html/rfc7230) or @@ -260,7 +258,8 @@ be part of a well-formed _GraphQL-over-HTTP request_. ## Accept A client MUST indicate the media types that it supports in responses using the -`Accept` HTTP header. +`Accept` HTTP header as specified in +[RFC7231](https://datatracker.ietf.org/doc/html/rfc7231). Note: If a client does not supply the `Accept` header then the server may respond with an error, or with any content type it chooses (including serving a @@ -349,7 +348,7 @@ _GraphQL-over-HTTP request_ parameters encoded in one of the officially recognized GraphQL media types, or another media type supported by the server. A client MUST indicate the media type of a request body using the `Content-Type` -header. +header as specified in [RFC7231](https://datatracker.ietf.org/doc/html/rfc7231). A server MUST support POST requests encoded with the `application/json` media type (as indicated by the `Content-Type` header) encoded with UTF-8. From 54fcc9b2f1b9d8bb1cde503dd6089ac1c428151b Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Thu, 2 Apr 2026 22:45:38 +0200 Subject: [PATCH 4/5] Use consistent links --- spec/GraphQLOverHTTP.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/GraphQLOverHTTP.md b/spec/GraphQLOverHTTP.md index ecd81109..4a3d4c4a 100644 --- a/spec/GraphQLOverHTTP.md +++ b/spec/GraphQLOverHTTP.md @@ -123,8 +123,8 @@ A server MUST comply with [RFC7231](https://datatracker.ietf.org/doc/html/rfc7231) semantics. A server MUST support at least one version of the HTTP message format, such as -[1.1](https://datatracker.ietf.org/doc/html/rfc7230) or -[2.0](https://www.rfc-editor.org/rfc/rfc9113). +[HTTP/1.1](https://datatracker.ietf.org/doc/html/rfc7230) or +[HTTP/2](https://datatracker.ietf.org/doc/html/rfc9113). A server MAY support several versions of the HTTP message format for wider compatibility. From 6899648f4a16b34d10bb4d75d26eada7e186bbc3 Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Fri, 3 Apr 2026 12:15:25 +0200 Subject: [PATCH 5/5] make the HTTP section a bit easier to read and not just about compliance --- spec/GraphQLOverHTTP.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spec/GraphQLOverHTTP.md b/spec/GraphQLOverHTTP.md index 4a3d4c4a..92793c2e 100644 --- a/spec/GraphQLOverHTTP.md +++ b/spec/GraphQLOverHTTP.md @@ -119,9 +119,16 @@ time. # HTTP protocol -A server MUST comply with +The details of the HTTP protocol used by GraphQL clients and servers are outside +this specification. + +Where applicable, server and clients MUST comply with [RFC7231](https://datatracker.ietf.org/doc/html/rfc7231) semantics. +In particular, "header", "status code", "body", "Accept", and "Content-Type" are +to be interpreted according to +[RFC7231](https://datatracker.ietf.org/doc/html/rfc7231). + A server MUST support at least one version of the HTTP message format, such as [HTTP/1.1](https://datatracker.ietf.org/doc/html/rfc7230) or [HTTP/2](https://datatracker.ietf.org/doc/html/rfc9113).