Skip to content

Commit

Permalink
To assist in on-boarding new users. (#2385)
Browse files Browse the repository at this point in the history
* To assist in on-boarding new users.

* Update data.md
  • Loading branch information
VikR0001 authored and evans committed Apr 17, 2019
1 parent e72c482 commit 5a0e848
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/source/essentials/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ const resolvers = {
};
```

With the resolver map above, the query, `{ author { books } }`, will call the `Query.author` resolver first and pass its result to `Author.books`. The query result will contain the return value of `Author.books` nested under `data.author.books`.

Note that you don't have to put all of your resolvers in one object. Refer to the ["modularizing the schema"](/docs/graphql-tools/generate-schema.html#modularizing) section to learn how to combine multiple resolver maps into one.

<h2 id="type-signature">Resolver type signature</h2>
Expand Down

0 comments on commit 5a0e848

Please sign in to comment.