Skip to content

Commit 9441c1e

Browse files
committed
Remove outdated implementation suggestions
* The `application/graphql` content-type is no longer recommended via the graphql-over-http spec * The graphql-over-http spec makes no recommendation of parsing the `query` query parameter for POST requests
1 parent 11aeff9 commit 9441c1e

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/content/learn/BestPractice-ServingOverHTTP.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,6 @@ A standard GraphQL POST request should use the `application/json` content type,
5454

5555
`operationName` and `variables` are optional fields. `operationName` is only required if multiple operations are present in the query.
5656

57-
In addition to the above, we recommend supporting two additional cases:
58-
59-
- If the "query" query string parameter is present (as in the GET example above), it should be parsed and handled in the same way as the HTTP GET case.
60-
- If the "application/graphql" Content-Type header is present, treat the HTTP POST body contents as the GraphQL query string.
61-
62-
If you're using express-graphql, you already get these behaviors for free.
63-
6457
## Response
6558

6659
Regardless of the method by which the query and variables were sent, the response should be returned in the body of the request in JSON format. As mentioned in the spec, a query might result in some data and some errors, and those should be returned in a JSON object of the form:

0 commit comments

Comments
 (0)