Skip to content

Commit 36f068e

Browse files
authored
Update doc examples to reflect the current API (#3393)
1 parent bc3564a commit 36f068e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ or an array of promises. A more complex example is included in the top-level [te
7171
Then, serve the result of a query against that type schema.
7272

7373
```js
74-
var query = '{ hello }';
74+
var source = '{ hello }';
7575

76-
graphql(schema, query).then((result) => {
76+
graphql({ schema, source }).then((result) => {
7777
// Prints
7878
// {
7979
// data: { hello: "world" }
@@ -87,9 +87,9 @@ first ensure the query is syntactically and semantically valid before executing
8787
it, reporting errors otherwise.
8888

8989
```js
90-
var query = '{ BoyHowdy }';
90+
var source = '{ BoyHowdy }';
9191

92-
graphql(schema, query).then((result) => {
92+
graphql({ schema, source }).then((result) => {
9393
// Prints
9494
// {
9595
// errors: [

0 commit comments

Comments
 (0)