Skip to content

Commit 484a9ad

Browse files
authored
switch back to graphql-http (#3774)
* switch back to graphql-http since we have rolled back to graphql@16 we are no longer testing incremental delivery and do not need to use graphql-helix for incremental delivery. * remove extraneous eslint disable directive
1 parent 31edfab commit 484a9ad

File tree

5 files changed

+3
-34
lines changed

5 files changed

+3
-34
lines changed

packages/graphiql/cypress/e2e/docs.cy.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ describe('GraphQL DocExplorer - deprecated fields', () => {
9898

9999
let describeOrSkip = describe.skip;
100100

101-
// TODO: disable when defer/stream is merged to graphql
102101
if (!version.includes('15.5')) {
103102
describeOrSkip = describe;
104103
}

packages/graphiql/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"express": "^4.19.2",
6969
"fork-ts-checker-webpack-plugin": "7.3.0",
7070
"graphql": "^16.9.0",
71-
"graphql-helix": "^1.13.0",
71+
"graphql-http": "^1.22.1",
7272
"graphql-subscriptions": "^2.0.0",
7373
"html-webpack-plugin": "^5.5.0",
7474
"identity-obj-proxy": "^3.0.0",

packages/graphiql/test/beforeDevServer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
const express = require('express');
99
const path = require('node:path');
10-
// eslint-disable-next-line import-x/no-extraneous-dependencies
1110
const { createHandler } = require('graphql-http/lib/use/express');
1211
const schema = require('./schema');
1312
const { customExecute } = require('./execute');

packages/graphiql/test/e2e-server.js

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,14 @@
99
const { createServer } = require('node:http');
1010
const express = require('express');
1111
const path = require('node:path');
12-
const {
13-
getGraphQLParameters,
14-
processRequest,
15-
sendResult,
16-
} = require('graphql-helix'); // update when `graphql-http` is upgraded to support multipart requests for incremental delivery https://github.com/graphql/graphiql/pull/3682#discussion_r1715545279
12+
const { createHandler } = require('graphql-http/lib/use/express');
1713
const WebSocketsServer = require('./afterDevServer');
1814
const schema = require('./schema');
1915
const { customExecute } = require('./execute');
2016

2117
const app = express();
2218

23-
async function handler(req, res) {
24-
const request = {
25-
body: req.body,
26-
headers: req.headers,
27-
method: req.method,
28-
query: req.query,
29-
};
30-
31-
const { operationName, query, variables } = getGraphQLParameters(request);
32-
33-
const result = await processRequest({
34-
operationName,
35-
query,
36-
variables,
37-
request,
38-
schema,
39-
execute: customExecute,
40-
});
41-
42-
sendResult(result, res);
43-
}
19+
const handler = createHandler({ schema, execute: customExecute });
4420

4521
// Server
4622
app.use(express.json());

yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10509,11 +10509,6 @@ graphql-config@5.0.3:
1050910509
string-env-interpolation "^1.0.1"
1051010510
tslib "^2.4.0"
1051110511

10512-
graphql-helix@^1.13.0:
10513-
version "1.13.0"
10514-
resolved "https://registry.yarnpkg.com/graphql-helix/-/graphql-helix-1.13.0.tgz#e64dad5ef5f622ef38c97fa033f56f3d953c0104"
10515-
integrity sha512-cqDKMoRywKjnL0ZWCTB0GOiBgsH6d3nU4JGDF6RuzAyd35tmalzKpSxkx3NNp4H5RvnKWnrukWzR51wUq277ng==
10516-
1051710512
graphql-http@^1.22.1:
1051810513
version "1.22.1"
1051910514
resolved "https://registry.yarnpkg.com/graphql-http/-/graphql-http-1.22.1.tgz#3857ac75366e55db189cfe09ade9cc4c4f2cfd09"

0 commit comments

Comments
 (0)