From 8410fed8f18f1687c0df5cfa574edd7eb15c38d6 Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Sat, 14 Dec 2024 10:43:34 +0800 Subject: [PATCH] remove unneeded beforeDevServer.js --- packages/graphiql/test/beforeDevServer.js | 26 ----------------------- 1 file changed, 26 deletions(-) delete mode 100644 packages/graphiql/test/beforeDevServer.js diff --git a/packages/graphiql/test/beforeDevServer.js b/packages/graphiql/test/beforeDevServer.js deleted file mode 100644 index 22c2b11bbb..0000000000 --- a/packages/graphiql/test/beforeDevServer.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) 2021 GraphQL Contributors. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const express = require('express'); -const path = require('node:path'); -const { createHandler } = require('graphql-http/lib/use/express'); -const schema = require('./schema'); -const { customExecute } = require('./execute'); - -module.exports = function beforeDevServer(app, _server, _compiler) { - // GraphQL Server - const handler = createHandler({ schema, execute: customExecute }); - app.post('/graphql', handler); - app.get('/graphql', handler); - - app.use('/images', express.static(path.join(__dirname, 'images'))); - - app.use( - '/resources/renderExample.js', - express.static(path.join(__dirname, '../resources/renderExample.js')), - ); -};