@@ -3,61 +3,63 @@ _* This report was auto-generated by graphql-http_
3
3
# GraphQL over HTTP audit report
4
4
5
5
- ** 73** audits in total
6
- - ✅ ** 32** pass
7
- - ⚠️ ** 37** warnings (optional)
8
- - ❌ ** 4** errors (required)
6
+ - ✅ ** 35** pass
7
+ - ⚠️ ** 38** warnings (optional)
9
8
10
9
## Passing
11
- 1 . MUST accept utf-8 encoding
12
- 2 . MUST assume utf-8 if encoding is unspecified
13
- 3 . MUST accept POST requests
14
- 4 . SHOULD respond with 4xx status code if content-type is not supplied on POST requests
15
- 5 . MUST accept application/json POST requests
16
- 6 . MUST require a request body on POST
17
- 7 . SHOULD use 400 status code on missing {query} parameter when accepting application/graphql-response+json
18
- 8 . SHOULD use 400 status code on object {query} parameter when accepting application/graphql-response+json
19
- 9 . SHOULD use 400 status code on number {query} parameter when accepting application/graphql-response+json
20
- 10 . SHOULD use 400 status code on boolean {query} parameter when accepting application/graphql-response+json
21
- 11 . SHOULD use 400 status code on array {query} parameter when accepting application/graphql-response+json
22
- 12 . SHOULD allow string {query} parameter when accepting application/graphql-response+json
23
- 13 . MUST allow string {query} parameter when accepting application/json
24
- 14 . SHOULD allow string {operationName} parameter when accepting application/graphql-response+json
25
- 15 . MUST allow string {operationName} parameter when accepting application/json
26
- 16 . SHOULD use 400 status code on string {variables} parameter when accepting application/graphql-response+json
27
- 17 . SHOULD allow map {variables} parameter when accepting application/graphql-response+json
28
- 18 . MUST allow map {variables} parameter when accepting application/json
29
- 19 . SHOULD use 400 status code on string {extensions} parameter when accepting application/graphql-response+json
30
- 20 . SHOULD allow map {extensions} parameter when accepting application/graphql-response+json
31
- 21 . MUST allow map {extensions} parameter when accepting application/json
32
- 22 . SHOULD use 4xx or 5xx status codes on JSON parsing failure when accepting application/graphql-response+json
33
- 23 . SHOULD use 400 status code on JSON parsing failure when accepting application/graphql-response+json
34
- 24 . SHOULD use 4xx or 5xx status codes if parameters are invalid when accepting application/graphql-response+json
35
- 25 . SHOULD use 400 status code if parameters are invalid when accepting application/graphql-response+json
36
- 26 . SHOULD not contain the data entry if parameters are invalid when accepting application/graphql-response+json
37
- 27 . SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
38
- 28 . SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json
39
- 29 . SHOULD not contain the data entry on document parsing failure when accepting application/graphql-response+json
40
- 30 . SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
41
- 31 . SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json
42
- 32 . SHOULD not contain the data entry on document validation failure when accepting application/graphql-response+json
10
+ 1 . SHOULD accept application/graphql-response+json and match the content-type
11
+ 2 . MUST accept application/json and match the content-type
12
+ 3 . MUST use utf-8 encoding when responding
13
+ 4 . MUST accept utf-8 encoding
14
+ 5 . MUST assume utf-8 if encoding is unspecified
15
+ 6 . MUST accept POST requests
16
+ 7 . SHOULD respond with 4xx status code if content-type is not supplied on POST requests
17
+ 8 . MUST accept application/json POST requests
18
+ 9 . MUST require a request body on POST
19
+ 10 . SHOULD use 400 status code on missing {query} parameter when accepting application/graphql-response+json
20
+ 11 . SHOULD use 400 status code on object {query} parameter when accepting application/graphql-response+json
21
+ 12 . SHOULD use 400 status code on number {query} parameter when accepting application/graphql-response+json
22
+ 13 . SHOULD use 400 status code on boolean {query} parameter when accepting application/graphql-response+json
23
+ 14 . SHOULD use 400 status code on array {query} parameter when accepting application/graphql-response+json
24
+ 15 . SHOULD allow string {query} parameter when accepting application/graphql-response+json
25
+ 16 . MUST allow string {query} parameter when accepting application/json
26
+ 17 . SHOULD allow string {operationName} parameter when accepting application/graphql-response+json
27
+ 18 . MUST allow string {operationName} parameter when accepting application/json
28
+ 19 . SHOULD use 400 status code on string {variables} parameter when accepting application/graphql-response+json
29
+ 20 . SHOULD allow map {variables} parameter when accepting application/graphql-response+json
30
+ 21 . MUST allow map {variables} parameter when accepting application/json
31
+ 22 . SHOULD use 400 status code on string {extensions} parameter when accepting application/graphql-response+json
32
+ 23 . SHOULD allow map {extensions} parameter when accepting application/graphql-response+json
33
+ 24 . MUST allow map {extensions} parameter when accepting application/json
34
+ 25 . SHOULD use 4xx or 5xx status codes on JSON parsing failure when accepting application/graphql-response+json
35
+ 26 . SHOULD use 400 status code on JSON parsing failure when accepting application/graphql-response+json
36
+ 27 . SHOULD use 4xx or 5xx status codes if parameters are invalid when accepting application/graphql-response+json
37
+ 28 . SHOULD use 400 status code if parameters are invalid when accepting application/graphql-response+json
38
+ 29 . SHOULD not contain the data entry if parameters are invalid when accepting application/graphql-response+json
39
+ 30 . SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
40
+ 31 . SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json
41
+ 32 . SHOULD not contain the data entry on document parsing failure when accepting application/graphql-response+json
42
+ 33 . SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
43
+ 34 . SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json
44
+ 35 . SHOULD not contain the data entry on document validation failure when accepting application/graphql-response+json
43
45
44
46
## Warnings
45
47
The server _ SHOULD_ support these, but is not required.
46
- 1 . SHOULD accept application/graphql-response+json and match the content-type<br />
48
+ 1 . SHOULD accept \* / \* and use application/graphql-response+json for the content-type<br />
47
49
```
48
- Status code 400 is not 200
50
+ Content-Type header "application/json; charset=utf-8" does not contain "application/graphql-response+json"
49
51
```
50
- 2 . SHOULD accept \* / \* and use application/graphql-response+json for the content-type<br />
52
+ 2 . SHOULD assume application/graphql-response+json content-type when accept is missing <br />
51
53
```
52
- Status code 400 is not 200
54
+ Content-Type header "application/json; charset=utf-8" does not contain "application/graphql-response+json"
53
55
```
54
- 3 . SHOULD assume application/graphql-response+json content-type when accept is missing <br />
56
+ 3 . MAY accept application/x-www-form-urlencoded formatted GET requests <br />
55
57
```
56
58
Status code 400 is not 200
57
59
```
58
- 4 . MAY accept application/x-www-form-urlencoded formatted GET requests<br />
60
+ 4 . MAY NOT allow executing mutations on GET requests<br />
59
61
```
60
- Status code 400 is not 200
62
+ Status code 400 is not 405
61
63
```
62
64
5 . SHOULD use 200 status code with errors field on missing {query} parameter when accepting application/json<br />
63
65
```
@@ -139,74 +141,60 @@ Execution result {"data":{"__typename":"Query"}} does not have a property 'error
139
141
```
140
142
Execution result {"data":{"__typename":"Query"}} does not have a property 'errors'
141
143
```
142
- 25 . SHOULD allow URL-encoded JSON string {variables} parameter in GETs when accepting application/graphql-response+json<br />
144
+ 25 . MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/graphql-response+json<br />
145
+ ```
146
+ Status code 400 is not 200
147
+ ```
148
+ 26 . MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/json<br />
143
149
```
144
150
Status code 400 is not 200
145
151
```
146
- 26 . SHOULD use 400 status code on number {extensions} parameter when accepting application/graphql-response+json<br />
152
+ 27 . SHOULD use 400 status code on number {extensions} parameter when accepting application/graphql-response+json<br />
147
153
```
148
154
Status code 200 is not 400
149
155
```
150
- 27 . SHOULD use 400 status code on boolean {extensions} parameter when accepting application/graphql-response+json<br />
156
+ 28 . SHOULD use 400 status code on boolean {extensions} parameter when accepting application/graphql-response+json<br />
151
157
```
152
158
Status code 200 is not 400
153
159
```
154
- 28 . SHOULD use 400 status code on array {extensions} parameter when accepting application/graphql-response+json<br />
160
+ 29 . SHOULD use 400 status code on array {extensions} parameter when accepting application/graphql-response+json<br />
155
161
```
156
162
Status code 200 is not 400
157
163
```
158
- 29 . SHOULD use 200 status code with errors field on string {extensions} parameter when accepting application/json<br />
164
+ 30 . SHOULD use 200 status code with errors field on string {extensions} parameter when accepting application/json<br />
159
165
```
160
166
Status code 400 is not 200
161
167
```
162
- 30 . SHOULD use 200 status code with errors field on number {extensions} parameter when accepting application/json<br />
168
+ 31 . SHOULD use 200 status code with errors field on number {extensions} parameter when accepting application/json<br />
163
169
```
164
170
Execution result {"data":{"__typename":"Query"}} does not have a property 'errors'
165
171
```
166
- 31 . SHOULD use 200 status code with errors field on boolean {extensions} parameter when accepting application/json<br />
172
+ 32 . SHOULD use 200 status code with errors field on boolean {extensions} parameter when accepting application/json<br />
167
173
```
168
174
Execution result {"data":{"__typename":"Query"}} does not have a property 'errors'
169
175
```
170
- 32 . SHOULD use 200 status code with errors field on array {extensions} parameter when accepting application/json<br />
176
+ 33 . SHOULD use 200 status code with errors field on array {extensions} parameter when accepting application/json<br />
171
177
```
172
178
Execution result {"data":{"__typename":"Query"}} does not have a property 'errors'
173
179
```
174
- 33 . SHOULD use 200 status code on JSON parsing failure when accepting application/json<br />
180
+ 34 . SHOULD use 200 status code on JSON parsing failure when accepting application/json<br />
175
181
```
176
182
Status code 400 is not 200
177
183
```
178
- 34 . SHOULD use 200 status code if parameters are invalid when accepting application/json<br />
184
+ 35 . SHOULD use 200 status code if parameters are invalid when accepting application/json<br />
179
185
```
180
186
Status code 400 is not 200
181
187
```
182
- 35 . SHOULD use 200 status code on document parsing failure when accepting application/json<br />
188
+ 36 . SHOULD use 200 status code on document parsing failure when accepting application/json<br />
183
189
```
184
190
Status code 400 is not 200
185
191
```
186
- 36 . SHOULD use 200 status code on document validation failure when accepting application/json<br />
192
+ 37 . SHOULD use 200 status code on document validation failure when accepting application/json<br />
187
193
```
188
194
Status code 400 is not 200
189
195
```
190
- 37 . SHOULD not contain the data entry on JSON parsing failure when accepting application/graphql-response+json<br />
196
+ 38 . SHOULD not contain the data entry on JSON parsing failure when accepting application/graphql-response+json<br />
191
197
```
192
198
Response body is not valid JSON. Got "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n<pre>SyntaxError: Unexpected end of JSON input<br> at JSON.parse (<anonymous>)<br> at parse (/home/runner/work/graphql-http/graphql-http/node_modules/body-parser/lib/types/json.js:89:19)<br> at /home/runner/work/graphql-http/graphql-http/node_modules/body-parser/lib/read.js:128:18<br> at AsyncResource.runInAsyncScope (node:async_hooks:203:9)<br> at invokeCallback (/home/runner/work/graphql-http/graphql-http/node_modules/raw-body/index.js:231:16)<br> at done (/home/runner/work/graphql-http/graphql-http/node_modules/raw-body/index.js:220:7)<br> at IncomingMessage.onEnd (/home/runner/work/graphql-http/graphql-http/node_modules/raw-body/index.js:280:7)<br> at IncomingMessage.emit (node:events:513:28)<br> at endReadableNT (node:internal/streams/rea...
193
199
```
194
200
195
- ## Errors
196
- The server _ MUST_ support these.
197
- 1 . MUST accept application/json and match the content-type<br />
198
- ```
199
- Status code 400 is not 200
200
- ```
201
- 2 . MUST use utf-8 encoding when responding<br />
202
- ```
203
- Status code 400 is not 200
204
- ```
205
- 3 . MUST NOT allow executing mutations on GET requests<br />
206
- ```
207
- Status code 400 is not 405
208
- ```
209
- 4 . MUST allow URL-encoded JSON string {variables} parameter in GETs when accepting application/json<br />
210
- ```
211
- Status code 400 is not 200
212
- ```
0 commit comments