From 1115f536d7301d5f4492417e9def3b73359e5fb1 Mon Sep 17 00:00:00 2001 From: sillywhirlpool <42634878+sillywhirlpool@users.noreply.github.com> Date: Sat, 8 Jan 2022 20:08:58 +0530 Subject: [PATCH] Update Tutorial-GettingStarted.md earlier code was generating error, so not beginner friendly --- src/content/graphql-js/Tutorial-GettingStarted.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/content/graphql-js/Tutorial-GettingStarted.md b/src/content/graphql-js/Tutorial-GettingStarted.md index 951387226e..e776828c8b 100644 --- a/src/content/graphql-js/Tutorial-GettingStarted.md +++ b/src/content/graphql-js/Tutorial-GettingStarted.md @@ -40,8 +40,10 @@ var root = { }; // Run the GraphQL query '{ hello }' and print out the response -graphql(schema, '{ hello }', root).then((response) => { - console.log(response); +graphql({ + schema: schema, source: '{ hello }', rootValue: root +}).then((response) => { + console.log(response); }); ```