Skip to content

Commit

Permalink
Use new audit IDs from graphql-http for filtering acceptable warnin…
Browse files Browse the repository at this point in the history
…gs (#7338)

This also upgrades the `graphql-http` dependency to the latest minor.
  • Loading branch information
trevor-scheer authored Jan 27, 2023
1 parent 9924f01 commit 01bc398
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/tricky-camels-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@apollo/server-integration-testsuite': patch
---

Update graphql-http to 1.13.0
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/integration-testsuite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@josephg/resolvable": "^1.0.1",
"body-parser": "^1.20.0",
"express": "^4.18.1",
"graphql-http": "1.12.0",
"graphql-http": "1.13.0",
"graphql-tag": "^2.12.6",
"loglevel": "^1.8.0",
"node-fetch": "^2.6.7",
Expand Down
28 changes: 25 additions & 3 deletions packages/integration-testsuite/src/httpSpecTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,32 @@ export function defineIntegrationTestSuiteHttpSpecTests(
// for a long time, and in fact a major reason these are merely SHOULDs
// in the spec is so that AS can pass without backwards-incompatible
// changes here. So we ignore these particular SHOULD failures.
const expectedWarning400InsteadOf200Ids = [
'3715',
'9FE0',
'9FE1',
'9FE2',
'9FE3',
'FB90',
'FB91',
'FB92',
'FB93',
'F050',
'F051',
'F052',
'F053',
'3680',
'3681',
'3682',
'3683',
'D477',
'F5AF',
'572B',
'FDE2',
];

if (
audit.name.startsWith('SHOULD use 200 status code') &&
audit.name.endsWith('when accepting application/json') &&
result.reason === 'Response status code is not 200' &&
expectedWarning400InsteadOf200Ids.includes(audit.id) &&
result.response.status === 400
) {
return;
Expand Down

0 comments on commit 01bc398

Please sign in to comment.