From 019ce8b936da9f9dcdbe20a22f30bbf7d6ed2429 Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Thu, 26 Jan 2023 14:11:23 -0800 Subject: [PATCH 1/3] Use explicit audit IDs for filtering acceptable warnings The latest minor in graphql-http adds unique and stable IDs for each audit. We can use these instead of substrings for explicitly filtering the audits we consider to be acceptable warnings. --- package-lock.json | 16 +++++------ packages/integration-testsuite/package.json | 2 +- .../src/httpSpecTests.ts | 28 +++++++++++++++++-- 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2bda84e9a92..e601e5c9148 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8147,9 +8147,9 @@ } }, "node_modules/graphql-http": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/graphql-http/-/graphql-http-1.12.0.tgz", - "integrity": "sha512-si8S+MRlRBZlRiE3n5KOwTMRVLWjVH1cwD96mw85EA+ZKHLMijzelRntwITv8I4zTNS1w9DIhq3F9Igr32H6KQ==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/graphql-http/-/graphql-http-1.13.0.tgz", + "integrity": "sha512-3Ia3ql9k+i/GvjNucwRdqdbumLeyJ8Zame4IhniMy/974t+Dy2mDnF08fOCKwXJwd3ErmzhYS/ZyvcXiX4v8wg==", "engines": { "node": ">=12" }, @@ -13507,7 +13507,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", @@ -13840,7 +13840,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", @@ -19979,9 +19979,9 @@ } }, "graphql-http": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/graphql-http/-/graphql-http-1.12.0.tgz", - "integrity": "sha512-si8S+MRlRBZlRiE3n5KOwTMRVLWjVH1cwD96mw85EA+ZKHLMijzelRntwITv8I4zTNS1w9DIhq3F9Igr32H6KQ==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/graphql-http/-/graphql-http-1.13.0.tgz", + "integrity": "sha512-3Ia3ql9k+i/GvjNucwRdqdbumLeyJ8Zame4IhniMy/974t+Dy2mDnF08fOCKwXJwd3ErmzhYS/ZyvcXiX4v8wg==", "requires": {} }, "graphql-request": { diff --git a/packages/integration-testsuite/package.json b/packages/integration-testsuite/package.json index f53811e3a41..921e2f4f794 100644 --- a/packages/integration-testsuite/package.json +++ b/packages/integration-testsuite/package.json @@ -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", diff --git a/packages/integration-testsuite/src/httpSpecTests.ts b/packages/integration-testsuite/src/httpSpecTests.ts index cef6646a583..7175f25e4f0 100644 --- a/packages/integration-testsuite/src/httpSpecTests.ts +++ b/packages/integration-testsuite/src/httpSpecTests.ts @@ -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 warning400InsteadOf200Ids = [ + '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' && + warning400InsteadOf200Ids.includes(audit.id) && result.response.status === 400 ) { return; From 131196936ea320eaf9585aa519310874477d5e63 Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Thu, 26 Jan 2023 14:13:37 -0800 Subject: [PATCH 2/3] changeset --- .changeset/tricky-camels-grin.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/tricky-camels-grin.md diff --git a/.changeset/tricky-camels-grin.md b/.changeset/tricky-camels-grin.md new file mode 100644 index 00000000000..0a68648349a --- /dev/null +++ b/.changeset/tricky-camels-grin.md @@ -0,0 +1,5 @@ +--- +'@apollo/server-integration-testsuite': patch +--- + +Update graphql-http to 1.13.0 From e40c098e203414c5b38ec52d76e4222d848c27f2 Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Thu, 26 Jan 2023 14:17:04 -0800 Subject: [PATCH 3/3] missed a save --- packages/integration-testsuite/src/httpSpecTests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/integration-testsuite/src/httpSpecTests.ts b/packages/integration-testsuite/src/httpSpecTests.ts index 7175f25e4f0..b230a37760d 100644 --- a/packages/integration-testsuite/src/httpSpecTests.ts +++ b/packages/integration-testsuite/src/httpSpecTests.ts @@ -59,7 +59,7 @@ 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 warning400InsteadOf200Ids = [ + const expectedWarning400InsteadOf200Ids = [ '3715', '9FE0', '9FE1', @@ -84,7 +84,7 @@ export function defineIntegrationTestSuiteHttpSpecTests( ]; if ( - warning400InsteadOf200Ids.includes(audit.id) && + expectedWarning400InsteadOf200Ids.includes(audit.id) && result.response.status === 400 ) { return;