From 36f068e8cca064f9796d35de27ba1ef489873926 Mon Sep 17 00:00:00 2001 From: Paul Serraino Date: Wed, 1 Dec 2021 05:40:11 -0600 Subject: [PATCH] Update doc examples to reflect the current API (#3393) --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 057cd89abc..34753472f9 100644 --- a/README.md +++ b/README.md @@ -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" } @@ -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: [