Skip to content

Commit

Permalink
[docm] Fix instance code (#119)
Browse files Browse the repository at this point in the history
* [docm] Fix instance code

* optimized code
  • Loading branch information
webvs2 authored Jun 16, 2023
1 parent 081a8d9 commit 34cfd94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/content/code/code.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ var schema = buildSchema(`

var root = { hello: () => 'Hello world!' };

graphql(schema, '{ hello }', root).then((response) => {
graphql({schema, source:'{ hello }', rootValue:root}).then((response) => {
console.log(response);
});
```
Expand Down
2 changes: 1 addition & 1 deletion src/content/graphql-js/Tutorial-GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var root = {
};

// 运行 GraphQL query '{ hello }' ,输出响应
graphql(schema, '{ hello }', root).then((response) => {
graphql({schema, source:'{ hello }', rootValue:root}).then((response) => {
console.log(response);
});
```
Expand Down

0 comments on commit 34cfd94

Please sign in to comment.