Closed xgrei closed 4 years ago
Hey @xgrei,
It seems like images
should return an array. Calling loader.call(i.post_id, i)
will return a single image by a post_id
.
You probably need to try https://github.com/exAspArk/batch-loader#loading-multiple-items to collect an array of images per post_id
. E.g.:
loader.call(i.post_id) { |memo| memo << i }
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
I use Searchkick gem in my project and I got a post list from Graphql, then I got N+1 problem.
its work well in console:
but images is null in result:
How to fix the problem with Graphql & Searchkick? Thanks.