@@ -3,171 +3,210 @@ _* This report was auto-generated by graphql-http_
3
3
# GraphQL over HTTP audit report
4
4
5
5
- ** 73** audits in total
6
- - ✅ ** 44** pass
7
- - ⚠️ ** 29** warnings (optional)
6
+ - ✅ ** 32** pass
7
+ - ⚠️ ** 37** warnings (optional)
8
+ - ❌ ** 4** errors (required)
8
9
9
10
## Passing
10
- 1 . MUST accept application/json and match the content-type
11
- 2 . MUST use utf-8 encoding when responding
12
- 3 . MUST accept utf-8 encoding
13
- 4 . MUST assume utf-8 if encoding is unspecified
14
- 5 . MUST accept POST requests
15
- 6 . MAY accept application/x-www-form-urlencoded formatted GET requests
16
- 7 . MUST NOT allow executing mutations on GET requests
17
- 8 . SHOULD respond with 4xx status code if content-type is not supplied on POST requests
18
- 9 . MUST accept application/json POST requests
19
- 10 . MUST require a request body on POST
20
- 11 . SHOULD use 400 status code on missing {query} parameter when accepting application/graphql-response+json
21
- 12 . SHOULD use 400 status code on object {query} parameter when accepting application/graphql-response+json
22
- 13 . SHOULD use 400 status code on number {query} parameter when accepting application/graphql-response+json
23
- 14 . SHOULD use 400 status code on boolean {query} parameter when accepting application/graphql-response+json
24
- 15 . SHOULD use 400 status code on array {query} parameter when accepting application/graphql-response+json
25
- 16 . SHOULD allow string {query} parameter when accepting application/graphql-response+json
26
- 17 . MUST allow string {query} parameter when accepting application/json
27
- 18 . SHOULD use 400 status code on object {operationName} parameter when accepting application/graphql-response+json
28
- 19 . SHOULD use 400 status code on number {operationName} parameter when accepting application/graphql-response+json
29
- 20 . SHOULD use 400 status code on boolean {operationName} parameter when accepting application/graphql-response+json
30
- 21 . SHOULD use 400 status code on array {operationName} parameter when accepting application/graphql-response+json
31
- 22 . SHOULD allow string {operationName} parameter when accepting application/graphql-response+json
32
- 23 . MUST allow string {operationName} parameter when accepting application/json
33
- 24 . SHOULD use 400 status code on string {variables} parameter when accepting application/graphql-response+json
34
- 25 . SHOULD use 400 status code on number {variables} parameter when accepting application/graphql-response+json
35
- 26 . SHOULD use 400 status code on boolean {variables} parameter when accepting application/graphql-response+json
36
- 27 . SHOULD allow map {variables} parameter when accepting application/graphql-response+json
37
- 28 . MUST allow map {variables} parameter when accepting application/json
38
- 29 . SHOULD allow URL-encoded JSON string {variables} parameter in GETs when accepting application/graphql-response+json
39
- 30 . MUST allow URL-encoded JSON string {variables} parameter in GETs when accepting application/json
40
- 31 . SHOULD use 400 status code on string {extensions} parameter when accepting application/graphql-response+json
41
- 32 . SHOULD allow map {extensions} parameter when accepting application/graphql-response+json
42
- 33 . MUST allow map {extensions} parameter when accepting application/json
43
- 34 . SHOULD use 4xx or 5xx status codes on JSON parsing failure when accepting application/graphql-response+json
44
- 35 . SHOULD use 400 status code on JSON parsing failure when accepting application/graphql-response+json
45
- 36 . SHOULD use 4xx or 5xx status codes if parameters are invalid when accepting application/graphql-response+json
46
- 37 . SHOULD use 400 status code if parameters are invalid when accepting application/graphql-response+json
47
- 38 . SHOULD not contain the data entry if parameters are invalid when accepting application/graphql-response+json
48
- 39 . SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
49
- 40 . SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json
50
- 41 . SHOULD not contain the data entry on document parsing failure when accepting application/graphql-response+json
51
- 42 . SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
52
- 43 . SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json
53
- 44 . SHOULD not contain the data entry on document validation failure when accepting application/graphql-response+json
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
54
43
55
44
## Warnings
56
45
The server _ SHOULD_ support these, but is not required.
57
46
1 . SHOULD accept application/graphql-response+json and match the content-type<br />
58
47
```
59
- Content-Type header "application/json; charset=utf-8" does not contain "application/graphql-response+json"
48
+ Status code 400 is not 200
60
49
```
61
50
2 . SHOULD accept \* /\* and use application/graphql-response+json for the content-type<br />
62
51
```
63
- Content-Type header "application/json; charset=utf-8" does not contain "application/graphql-response+json"
52
+ Status code 400 is not 200
64
53
```
65
54
3 . SHOULD assume application/graphql-response+json content-type when accept is missing<br />
66
55
```
67
- Content-Type header "application/json; charset=utf-8" does not contain "application/graphql-response+json"
56
+ Status code 400 is not 200
68
57
```
69
- 4 . SHOULD use 200 status code with errors field on missing {query} parameter when accepting application/json <br />
58
+ 4 . MAY accept application/x-www-form-urlencoded formatted GET requests <br />
70
59
```
71
60
Status code 400 is not 200
72
61
```
73
- 5 . SHOULD use 200 status code with errors field on object {query} parameter when accepting application/json<br />
62
+ 5 . SHOULD use 200 status code with errors field on missing {query} parameter when accepting application/json<br />
74
63
```
75
64
Status code 400 is not 200
76
65
```
77
- 6 . SHOULD use 200 status code with errors field on number {query} parameter when accepting application/json<br />
66
+ 6 . SHOULD use 200 status code with errors field on object {query} parameter when accepting application/json<br />
78
67
```
79
68
Status code 400 is not 200
80
69
```
81
- 7 . SHOULD use 200 status code with errors field on boolean {query} parameter when accepting application/json<br />
70
+ 7 . SHOULD use 200 status code with errors field on number {query} parameter when accepting application/json<br />
82
71
```
83
72
Status code 400 is not 200
84
73
```
85
- 8 . SHOULD use 200 status code with errors field on array {query} parameter when accepting application/json<br />
74
+ 8 . SHOULD use 200 status code with errors field on boolean {query} parameter when accepting application/json<br />
86
75
```
87
76
Status code 400 is not 200
88
77
```
89
- 9 . SHOULD use 200 status code with errors field on object {operationName } parameter when accepting application/json<br />
78
+ 9 . SHOULD use 200 status code with errors field on array {query } parameter when accepting application/json<br />
90
79
```
91
80
Status code 400 is not 200
92
81
```
93
- 10 . SHOULD use 200 status code with errors field on number {operationName} parameter when accepting application/json<br />
82
+ 10 . SHOULD use 400 status code on object {operationName} parameter when accepting application/graphql-response+ json<br />
94
83
```
95
- Status code 400 is not 200
84
+ Status code 200 is not 400
96
85
```
97
- 11 . SHOULD use 200 status code with errors field on boolean {operationName} parameter when accepting application/json<br />
86
+ 11 . SHOULD use 400 status code on number {operationName} parameter when accepting application/graphql-response+ json<br />
98
87
```
99
- Status code 400 is not 200
88
+ Status code 200 is not 400
100
89
```
101
- 12 . SHOULD use 200 status code with errors field on array {operationName} parameter when accepting application/json<br />
90
+ 12 . SHOULD use 400 status code on boolean {operationName} parameter when accepting application/graphql-response+ json<br />
102
91
```
103
- Status code 400 is not 200
92
+ Status code 200 is not 400
104
93
```
105
- 13 . SHOULD use 400 status code on array {variables } parameter when accepting application/graphql-response+json<br />
94
+ 13 . SHOULD use 400 status code on array {operationName } parameter when accepting application/graphql-response+json<br />
106
95
```
107
96
Status code 200 is not 400
108
97
```
109
- 14 . SHOULD use 200 status code with errors field on string {variables } parameter when accepting application/json<br />
98
+ 14 . SHOULD use 200 status code with errors field on object {operationName } parameter when accepting application/json<br />
110
99
```
111
- Status code 400 is not 200
100
+ Execution result {"data":{"__typename":"Query"}} does not have a property 'errors'
112
101
```
113
- 15 . SHOULD use 200 status code with errors field on number {variables } parameter when accepting application/json<br />
102
+ 15 . SHOULD use 200 status code with errors field on number {operationName } parameter when accepting application/json<br />
114
103
```
115
- Status code 400 is not 200
104
+ Execution result {"data":{"__typename":"Query"}} does not have a property 'errors'
105
+ ```
106
+ 16 . SHOULD use 200 status code with errors field on boolean {operationName} parameter when accepting application/json<br />
107
+ ```
108
+ Execution result {"data":{"__typename":"Query"}} does not have a property 'errors'
109
+ ```
110
+ 17 . SHOULD use 200 status code with errors field on array {operationName} parameter when accepting application/json<br />
111
+ ```
112
+ Execution result {"data":{"__typename":"Query"}} does not have a property 'errors'
113
+ ```
114
+ 18 . SHOULD use 400 status code on number {variables} parameter when accepting application/graphql-response+json<br />
115
+ ```
116
+ Status code 200 is not 400
117
+ ```
118
+ 19 . SHOULD use 400 status code on boolean {variables} parameter when accepting application/graphql-response+json<br />
119
+ ```
120
+ Status code 200 is not 400
121
+ ```
122
+ 20 . SHOULD use 400 status code on array {variables} parameter when accepting application/graphql-response+json<br />
123
+ ```
124
+ Status code 200 is not 400
116
125
```
117
- 16 . SHOULD use 200 status code with errors field on boolean {variables} parameter when accepting application/json<br />
126
+ 21 . SHOULD use 200 status code with errors field on string {variables} parameter when accepting application/json<br />
118
127
```
119
128
Status code 400 is not 200
120
129
```
121
- 17 . SHOULD use 200 status code with errors field on array {variables} parameter when accepting application/json<br />
130
+ 22 . SHOULD use 200 status code with errors field on number {variables} parameter when accepting application/json<br />
131
+ ```
132
+ Execution result {"data":{"__typename":"Query"}} does not have a property 'errors'
133
+ ```
134
+ 23 . SHOULD use 200 status code with errors field on boolean {variables} parameter when accepting application/json<br />
135
+ ```
136
+ Execution result {"data":{"__typename":"Query"}} does not have a property 'errors'
137
+ ```
138
+ 24 . SHOULD use 200 status code with errors field on array {variables} parameter when accepting application/json<br />
122
139
```
123
140
Execution result {"data":{"__typename":"Query"}} does not have a property 'errors'
124
141
```
125
- 18 . SHOULD use 400 status code on number {extensions} parameter when accepting application/graphql-response+json<br />
142
+ 25 . SHOULD allow URL-encoded JSON string {variables} parameter in GETs when accepting application/graphql-response+json<br />
143
+ ```
144
+ Status code 400 is not 200
145
+ ```
146
+ 26 . SHOULD use 400 status code on number {extensions} parameter when accepting application/graphql-response+json<br />
126
147
```
127
148
Status code 200 is not 400
128
149
```
129
- 19 . SHOULD use 400 status code on boolean {extensions} parameter when accepting application/graphql-response+json<br />
150
+ 27 . SHOULD use 400 status code on boolean {extensions} parameter when accepting application/graphql-response+json<br />
130
151
```
131
152
Status code 200 is not 400
132
153
```
133
- 20 . SHOULD use 400 status code on array {extensions} parameter when accepting application/graphql-response+json<br />
154
+ 28 . SHOULD use 400 status code on array {extensions} parameter when accepting application/graphql-response+json<br />
134
155
```
135
156
Status code 200 is not 400
136
157
```
137
- 21 . SHOULD use 200 status code with errors field on string {extensions} parameter when accepting application/json<br />
158
+ 29 . SHOULD use 200 status code with errors field on string {extensions} parameter when accepting application/json<br />
138
159
```
139
160
Status code 400 is not 200
140
161
```
141
- 22 . SHOULD use 200 status code with errors field on number {extensions} parameter when accepting application/json<br />
162
+ 30 . SHOULD use 200 status code with errors field on number {extensions} parameter when accepting application/json<br />
142
163
```
143
164
Execution result {"data":{"__typename":"Query"}} does not have a property 'errors'
144
165
```
145
- 23 . SHOULD use 200 status code with errors field on boolean {extensions} parameter when accepting application/json<br />
166
+ 31 . SHOULD use 200 status code with errors field on boolean {extensions} parameter when accepting application/json<br />
146
167
```
147
168
Execution result {"data":{"__typename":"Query"}} does not have a property 'errors'
148
169
```
149
- 24 . SHOULD use 200 status code with errors field on array {extensions} parameter when accepting application/json<br />
170
+ 32 . SHOULD use 200 status code with errors field on array {extensions} parameter when accepting application/json<br />
150
171
```
151
172
Execution result {"data":{"__typename":"Query"}} does not have a property 'errors'
152
173
```
153
- 25 . SHOULD use 200 status code on JSON parsing failure when accepting application/json<br />
174
+ 33 . SHOULD use 200 status code on JSON parsing failure when accepting application/json<br />
154
175
```
155
176
Status code 400 is not 200
156
177
```
157
- 26 . SHOULD use 200 status code if parameters are invalid when accepting application/json<br />
178
+ 34 . SHOULD use 200 status code if parameters are invalid when accepting application/json<br />
158
179
```
159
180
Status code 400 is not 200
160
181
```
161
- 27 . SHOULD use 200 status code on document parsing failure when accepting application/json<br />
182
+ 35 . SHOULD use 200 status code on document parsing failure when accepting application/json<br />
162
183
```
163
184
Status code 400 is not 200
164
185
```
165
- 28 . SHOULD use 200 status code on document validation failure when accepting application/json<br />
186
+ 36 . SHOULD use 200 status code on document validation failure when accepting application/json<br />
166
187
```
167
188
Status code 400 is not 200
168
189
```
169
- 29 . SHOULD not contain the data entry on JSON parsing failure when accepting application/graphql-response+json<br />
190
+ 37 . SHOULD not contain the data entry on JSON parsing failure when accepting application/graphql-response+json<br />
170
191
```
171
192
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...
172
193
```
173
194
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