Skip to content

Commit 1115f53

Browse files
Update Tutorial-GettingStarted.md
earlier code was generating error, so not beginner friendly
1 parent c9417e4 commit 1115f53

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/content/graphql-js/Tutorial-GettingStarted.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ var root = {
4040
};
4141

4242
// Run the GraphQL query '{ hello }' and print out the response
43-
graphql(schema, '{ hello }', root).then((response) => {
44-
console.log(response);
43+
graphql({
44+
schema: schema, source: '{ hello }', rootValue: root
45+
}).then((response) => {
46+
console.log(response);
4547
});
4648
```
4749

0 commit comments

Comments
 (0)