You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -258,13 +258,13 @@ query = "
258
258
Schema.execute(query)
259
259
```
260
260
261
-
To avoid this problem, all we have to do is to change the resolver to return `BatchLoader`:
261
+
To avoid this problem, all we have to do is to change the resolver to return `BatchLoader::GraphQL` ([#32](https://github.com/exAspArk/batch-loader/pull/32) explains why not just `BatchLoader`):
262
262
263
263
```ruby
264
264
PostType=GraphQL::ObjectType.define do
265
265
name "Post"
266
266
field :user, !UserType, resolve:->(post, args, ctx) do
267
-
BatchLoader.for(post.user_id).batch do |user_ids, loader|
267
+
BatchLoader::GraphQL.for(post.user_id).batch do |user_ids, loader|
0 commit comments