Moving On
If your head is spinning a bit about when to use each of these plugins, don’t fear—we’re going to take a moment and recap what we covered in this chapter. The linear “one field at a time” approach that Absinthe takes when executing your documents is a great default, but it isn’t what you want all the time. When you want things to go differently, you combine middleware’s ability to suspend fields with plugins, which give you before and after resolution callbacks. We looked at three built-in plugins that Absinthe supplies: Async, Batch, and Dataloader.
-
Dataloader: Use this library when it makes sense to get data in aggregate out of sources. It ships with integrations with Ecto and some flexible modules for making more sources. It provides ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access