Skip to content

Commit

Permalink
Update doc examples to reflect the current API (#3393)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulserraino committed Dec 1, 2021
1 parent bc3564a commit 36f068e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -71,9 +71,9 @@ or an array of promises. A more complex example is included in the top-level [te
Then, serve the result of a query against that type schema.

```js
var query = '{ hello }';
var source = '{ hello }';

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

```js
var query = '{ BoyHowdy }';
var source = '{ BoyHowdy }';

graphql(schema, query).then((result) => {
graphql({ schema, source }).then((result) => {
// Prints
// {
// errors: [
Expand Down

0 comments on commit 36f068e

Please sign in to comment.