We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87d003d commit 4c76c59Copy full SHA for 4c76c59
integrationTests/node/index.cjs
@@ -0,0 +1,26 @@
1
+const assert = require('assert');
2
+const { readFileSync } = require('fs');
3
+
4
+const { graphqlSync } = require('graphql');
5
+const { buildSchema } = require('graphql/utilities');
6
+const { version } = require('graphql/version');
7
8
+assert.deepStrictEqual(
9
+ version,
10
+ JSON.parse(readFileSync('./node_modules/graphql/package.json')).version,
11
+);
12
13
+const schema = buildSchema('type Query { hello: String }');
14
15
+const result = graphqlSync({
16
+ schema,
17
+ source: '{ hello }',
18
+ rootValue: { hello: 'world' },
19
+});
20
21
+assert.deepStrictEqual(result, {
22
+ data: {
23
+ __proto__: null,
24
+ hello: 'world',
25
+ },
26
0 commit comments