Skip to content

Commit

Permalink
switch back to graphql-http (#3774)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
yaacovCR authored Sep 10, 2024
1 parent 31edfab commit 484a9ad
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 34 deletions.
1 change: 0 additions & 1 deletion packages/graphiql/cypress/e2e/docs.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ describe('GraphQL DocExplorer - deprecated fields', () => {

let describeOrSkip = describe.skip;

// TODO: disable when defer/stream is merged to graphql
if (!version.includes('15.5')) {
describeOrSkip = describe;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/graphiql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"express": "^4.19.2",
"fork-ts-checker-webpack-plugin": "7.3.0",
"graphql": "^16.9.0",
"graphql-helix": "^1.13.0",
"graphql-http": "^1.22.1",
"graphql-subscriptions": "^2.0.0",
"html-webpack-plugin": "^5.5.0",
"identity-obj-proxy": "^3.0.0",
Expand Down
1 change: 0 additions & 1 deletion packages/graphiql/test/beforeDevServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

const express = require('express');
const path = require('node:path');
// eslint-disable-next-line import-x/no-extraneous-dependencies
const { createHandler } = require('graphql-http/lib/use/express');
const schema = require('./schema');
const { customExecute } = require('./execute');
Expand Down
28 changes: 2 additions & 26 deletions packages/graphiql/test/e2e-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,14 @@
const { createServer } = require('node:http');
const express = require('express');
const path = require('node:path');
const {
getGraphQLParameters,
processRequest,
sendResult,
} = 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
const { createHandler } = require('graphql-http/lib/use/express');
const WebSocketsServer = require('./afterDevServer');
const schema = require('./schema');
const { customExecute } = require('./execute');

const app = express();

async function handler(req, res) {
const request = {
body: req.body,
headers: req.headers,
method: req.method,
query: req.query,
};

const { operationName, query, variables } = getGraphQLParameters(request);

const result = await processRequest({
operationName,
query,
variables,
request,
schema,
execute: customExecute,
});

sendResult(result, res);
}
const handler = createHandler({ schema, execute: customExecute });

// Server
app.use(express.json());
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10509,11 +10509,6 @@ [email protected]:
string-env-interpolation "^1.0.1"
tslib "^2.4.0"

graphql-helix@^1.13.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/graphql-helix/-/graphql-helix-1.13.0.tgz#e64dad5ef5f622ef38c97fa033f56f3d953c0104"
integrity sha512-cqDKMoRywKjnL0ZWCTB0GOiBgsH6d3nU4JGDF6RuzAyd35tmalzKpSxkx3NNp4H5RvnKWnrukWzR51wUq277ng==

graphql-http@^1.22.1:
version "1.22.1"
resolved "https://registry.yarnpkg.com/graphql-http/-/graphql-http-1.22.1.tgz#3857ac75366e55db189cfe09ade9cc4c4f2cfd09"
Expand Down

0 comments on commit 484a9ad

Please sign in to comment.