Skip to content

Commit 6dfda7c

Browse files
authored
Merge pull request #1239 from goncharov-vlad/patch-1
Fixed javascript code snippet
2 parents 0aaf829 + dfe6e5e commit 6dfda7c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/content/code/language-support/javascript/server/graphql-js.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ var schema = buildSchema(`
2323
}
2424
`);
2525

26-
var root = { hello: () => 'Hello world!' };
26+
var rootValue = { hello: () => 'Hello world!' };
2727

28-
graphql(schema, '{ hello }', root).then((response) => {
28+
var source = '{ hello }';
29+
30+
graphql({ schema, source, rootValue }).then((response) => {
2931
console.log(response);
3032
});
3133
```

0 commit comments

Comments
 (0)