diff --git a/site/graphql-js/Tutorial-GettingStarted.md b/site/graphql-js/Tutorial-GettingStarted.md index 0e492ae00d..751a83d1a1 100644 --- a/site/graphql-js/Tutorial-GettingStarted.md +++ b/site/graphql-js/Tutorial-GettingStarted.md @@ -33,14 +33,14 @@ var schema = buildSchema(` `); // The root provides a resolver function for each API endpoint -var root = { +var rootValue = { hello: () => { return 'Hello world!'; }, }; // Run the GraphQL query '{ hello }' and print out the response -graphql(schema, '{ hello }', root).then((response) => { +graphql({ schema, source: '{ hello }', rootValue }).then((response) => { console.log(response); }); ```