Skip to content

Commit 8ab3c70

Browse files
committed
revert test schema change
1 parent 36242cd commit 8ab3c70

File tree

3 files changed

+3
-32
lines changed

3 files changed

+3
-32
lines changed

packages/graphiql/test/beforeDevServer.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
const express = require('express');
99
const path = require('node:path');
1010
const { createHandler } = require('graphql-http/lib/use/express');
11-
const { schema, changedSchema } = require('./schema');
11+
const schema = require('./schema');
1212
const { schema: badSchema } = require('./bad-schema');
1313

1414
module.exports = function beforeDevServer(app, _server, _compiler) {
@@ -21,11 +21,6 @@ module.exports = function beforeDevServer(app, _server, _compiler) {
2121
next();
2222
});
2323

24-
app.post('/changed/graphql', (_req, res, next) => {
25-
res.json({ data: changedSchema });
26-
next();
27-
});
28-
2924
app.use('/images', express.static(path.join(__dirname, 'images')));
3025

3126
app.use(

packages/graphiql/test/e2e-server.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const express = require('express');
1010
const path = require('node:path');
1111
const { createHandler } = require('graphql-http/lib/use/express');
1212
const { GraphQLError } = require('graphql');
13-
const { schema, changedSchema } = require('./schema');
13+
const schema = require('./schema');
1414
const app = express();
1515
const { schema: badSchema } = require('./bad-schema');
1616
const WebSocketsServer = require('./afterDevServer');
@@ -30,11 +30,6 @@ app.post('/bad/graphql', (_req, res, next) => {
3030
next();
3131
});
3232

33-
app.post('/changed/graphql', (_req, res, next) => {
34-
res.json({ data: changedSchema });
35-
next();
36-
});
37-
3833
app.post('/http-error/graphql', (_req, res, next) => {
3934
res.status(502).send('Bad Gateway');
4035
next();

packages/graphiql/test/schema.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ const TestInputObject = new GraphQLInputObjectType({
7373
}),
7474
});
7575

76-
module.exports.testInputObject = TestInputObject;
77-
7876
const TestInterface = new GraphQLInterfaceType({
7977
name: 'TestInterface',
8078
description: 'Test interface.',
@@ -346,23 +344,6 @@ const TestType = new GraphQLObjectType({
346344
}),
347345
});
348346

349-
module.exports.testType = TestType;
350-
351-
const ChangedSchema = new GraphQLSchema({
352-
query: new GraphQLObjectType({
353-
name: 'Query',
354-
fields: {
355-
...TestType.fields,
356-
isTest: {
357-
type: GraphQLString,
358-
description: 'This is changed to a string field',
359-
},
360-
},
361-
}),
362-
});
363-
364-
module.exports.changedSchema = ChangedSchema;
365-
366347
const TestMutationType = new GraphQLObjectType({
367348
name: 'MutationType',
368349
description: 'This is a simple mutation type',
@@ -407,4 +388,4 @@ const myTestSchema = new GraphQLSchema({
407388
description: 'This is a test schema for GraphiQL',
408389
});
409390

410-
module.exports.schema = myTestSchema;
391+
module.exports = myTestSchema;

0 commit comments

Comments
 (0)