Skip to content

Commit

Permalink
Add missing file from graphql#3361
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Sep 21, 2022
1 parent 87d003d commit 4c76c59
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions integrationTests/node/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const assert = require('assert');
const { readFileSync } = require('fs');

const { graphqlSync } = require('graphql');
const { buildSchema } = require('graphql/utilities');
const { version } = require('graphql/version');

assert.deepStrictEqual(
version,
JSON.parse(readFileSync('./node_modules/graphql/package.json')).version,
);

const schema = buildSchema('type Query { hello: String }');

const result = graphqlSync({
schema,
source: '{ hello }',
rootValue: { hello: 'world' },
});

assert.deepStrictEqual(result, {
data: {
__proto__: null,
hello: 'world',
},
});

0 comments on commit 4c76c59

Please sign in to comment.