|
3 | 3 | <h1>GraphQL over HTTP audit report</h1>
|
4 | 4 |
|
5 | 5 | <ul>
|
6 |
| -<li><b>78</b> audits in total</li> |
7 |
| -<li><span style="font-family: monospace">✅</span> <b>53</b> pass</li> |
8 |
| -<li><span style="font-family: monospace">⚠️</span> <b>25</b> warnings (optional)</li> |
| 6 | +<li><b>80</b> audits in total</li> |
| 7 | +<li><span style="font-family: monospace">✅</span> <b>54</b> pass</li> |
| 8 | +<li><span style="font-family: monospace">⚠️</span> <b>26</b> warnings (optional)</li> |
9 | 9 | </ul>
|
10 | 10 |
|
11 | 11 | <h2>Passing</h2>
|
|
63 | 63 | <li><code>51FE</code> SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json</li>
|
64 | 64 | <li><code>74FF</code> SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json</li>
|
65 | 65 | <li><code>5E5B</code> SHOULD not contain the data entry on document validation failure when accepting application/graphql-response+json</li>
|
| 66 | +<li><code>86EE</code> SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json</li> |
66 | 67 | </ol>
|
67 | 68 |
|
68 | 69 | <h2>Warnings</h2>
|
@@ -1037,5 +1038,79 @@ The server <i>SHOULD</i> support these, but is not required.
|
1037 | 1038 | </code></pre>
|
1038 | 1039 | </details>
|
1039 | 1040 | </li>
|
| 1041 | +<li><code>7B9B</code> SHOULD use a status code of 200 on variable coercion failure when accepting application/json |
| 1042 | +<details> |
| 1043 | +<summary>Response status code is not 200</summary> |
| 1044 | +<pre><code class="lang-json">{ |
| 1045 | + "statusText": "Bad Request", |
| 1046 | + "status": 400, |
| 1047 | + "headers": { |
| 1048 | + "x-powered-by": "Express", |
| 1049 | + "etag": "W/\"bb6-gXaURMU/HGIiPsrBiHj0x/xi2Cw\"", |
| 1050 | + "date": "<timestamp>", |
| 1051 | + "content-type": "application/json; charset=utf-8", |
| 1052 | + "content-length": "2998", |
| 1053 | + "connection": "close", |
| 1054 | + "cache-control": "no-store", |
| 1055 | + "access-control-allow-origin": "*" |
| 1056 | + }, |
| 1057 | + "body": { |
| 1058 | + "errors": [ |
| 1059 | + { |
| 1060 | + "message": "Unknown type \"ID\".", |
| 1061 | + "locations": [ |
| 1062 | + { |
| 1063 | + "line": 1, |
| 1064 | + "column": 26 |
| 1065 | + } |
| 1066 | + ], |
| 1067 | + "extensions": { |
| 1068 | + "stacktrace": [ |
| 1069 | + "GraphQLError: Unknown type \"ID\".", |
| 1070 | + " at Object.NamedType (/home/runner/work/graphql-http/graphql-http/node_modules/graphql/validation/rules/KnownTypeNamesRule.js:65:11)", |
| 1071 | + " at Object.enter (/home/runner/work/graphql-http/graphql-http/node_modules/graphql/language/visitor.js:301:32)", |
| 1072 | + " at Object.enter (/home/runner/work/graphql-http/graphql-http/node_modules/graphql/utilities/TypeInfo.js:391:27)", |
| 1073 | + " at visit (/home/runner/work/graphql-http/graphql-http/node_modules/graphql/language/visitor.js:197:21)", |
| 1074 | + " at validate (/home/runner/work/graphql-http/graphql-http/node_modules/graphql/validation/validate.js:91:24)", |
| 1075 | + " at processGraphQLRequest (file:///home/runner/work/graphql-http/graphql-http/node_modules/@apollo/server/dist/esm/requestPipeline.js:97:34)", |
| 1076 | + " at process.processTicksAndRejections (node:internal/process/task_queues:95:5)", |
| 1077 | + " at async internalExecuteOperation (file:///home/runner/work/graphql-http/graphql-http/node_modules/@apollo/server/dist/esm/ApolloServer.js:585:16)", |
| 1078 | + " at async runHttpQuery (file:///home/runner/work/graphql-http/graphql-http/node_modules/@apollo/server/dist/esm/runHttpQuery.js:129:29)", |
| 1079 | + " at async runPotentiallyBatchedHttpQuery (file:///home/runner/work/graphql-http/graphql-http/node_modules/@apollo/server/dist/esm/httpBatching.js:34:16)" |
| 1080 | + ], |
| 1081 | + "code": "GRAPHQL_VALIDATION_FAILED" |
| 1082 | + } |
| 1083 | + }, |
| 1084 | + { |
| 1085 | + "message": "Variable \"$id\" is never used in operation \"CoerceFailure\".", |
| 1086 | + "locations": [ |
| 1087 | + { |
| 1088 | + "line": 1, |
| 1089 | + "column": 21 |
| 1090 | + } |
| 1091 | + ], |
| 1092 | + "extensions": { |
| 1093 | + "stacktrace": [ |
| 1094 | + "GraphQLError: Variable \"$id\" is never used in operation \"CoerceFailure\".", |
| 1095 | + " at Object.leave (/home/runner/work/graphql-http/graphql-http/node_modules/graphql/validation/rules/NoUnusedVariablesRule.js:39:15)", |
| 1096 | + " at Object.leave (/home/runner/work/graphql-http/graphql-http/node_modules/graphql/language/visitor.js:324:32)", |
| 1097 | + " at Object.leave (/home/runner/work/graphql-http/graphql-http/node_modules/graphql/utilities/TypeInfo.js:411:21)", |
| 1098 | + " at visit (/home/runner/work/graphql-http/graphql-http/node_modules/graphql/language/visitor.js:197:21)", |
| 1099 | + " at validate (/home/runner/work/graphql-http/graphql-http/node_modules/graphql/validation/validate.js:91:24)", |
| 1100 | + " at processGraphQLRequest (file:///home/runner/work/graphql-http/graphql-http/node_modules/@apollo/server/dist/esm/requestPipeline.js:97:34)", |
| 1101 | + " at process.processTicksAndRejections (node:internal/process/task_queues:95:5)", |
| 1102 | + " at async internalExecuteOperation (file:///home/runner/work/graphql-http/graphql-http/node_modules/@apollo/server/dist/esm/ApolloServer.js:585:16)", |
| 1103 | + " at async runHttpQuery (file:///home/runner/work/graphql-http/graphql-http/node_modules/@apollo/server/dist/esm/runHttpQuery.js:129:29)", |
| 1104 | + " at async runPotentiallyBatchedHttpQuery (file:///home/runner/work/graphql-http/graphql-http/node_modules/@apollo/server/dist/esm/httpBatching.js:34:16)" |
| 1105 | + ], |
| 1106 | + "code": "GRAPHQL_VALIDATION_FAILED" |
| 1107 | + } |
| 1108 | + } |
| 1109 | + ] |
| 1110 | + } |
| 1111 | +} |
| 1112 | +</code></pre> |
| 1113 | +</details> |
| 1114 | +</li> |
1040 | 1115 | </ol>
|
1041 | 1116 |
|
0 commit comments