Skip to content

Commit b7cf082

Browse files
committed
[docm] Fix instance code
1 parent 081a8d9 commit b7cf082

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/content/code/code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ var schema = buildSchema(`
304304

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

307-
graphql(schema, '{ hello }', root).then((response) => {
307+
graphql({schema:schema, source:'{ hello }', rootValue:root}).then((response) => {
308308
console.log(response);
309309
});
310310
```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var root = {
4040
};
4141

4242
// 运行 GraphQL query '{ hello }' ,输出响应
43-
graphql(schema, '{ hello }', root).then((response) => {
43+
graphql({schema:schema, source:'{ hello }', rootValue:root}).then((response) => {
4444
console.log(response);
4545
});
4646
```

0 commit comments

Comments
 (0)