Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update doc examples to reflect the current API #3393

Merged
merged 1 commit into from Dec 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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