Skip to content

Commit

Permalink
Mention dataloader as other batching solution
Browse files Browse the repository at this point in the history
  • Loading branch information
sheerun committed Jul 7, 2017
1 parent db45cdb commit 691d6e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion guides/schema/lazy_execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ With lazy execution, you can optimize access to external services (such as datab

[`graphql-batch`](https://github.com/shopify/graphql-batch) provides a powerful, flexible toolkit for lazy resolution with GraphQL.

[`dataloader`](https://github.com/sheerun/dataloader) is more general [`promise`](https://github.com/lgierth/promise.rb)-based utilify for batching queries within the same thread.


Lazy resolution can be [instrumented]({{ site.baseurl }}/fields/instrumentation).

Expand Down Expand Up @@ -89,4 +91,4 @@ Now, calls to `author` will use batched database access. For example, this query

Will only make one query to load the `author` values.

The example above is simple and has some shortcomings. Consider the `graphql-batch` gem for a robust solution to batched resolution.
The example above is simple and has some shortcomings. Consider the `graphql-batch` or `dataloader` gem for a robust solution to batched resolution.

0 comments on commit 691d6e8

Please sign in to comment.