Dataloader

Learn how to get the data efficiently without coupling our GraphQL API tightly to the SQL structure.

Discovering Dataloader

Dataloader is a small package that defines a minimalist API for getting data in batches. We can use it within our contexts to keep all the SQL details nicely packed away, while still providing flexibility. It also won’t require us to have numerous context boilerplates either. Although Dataloader is managed under the absinthe-graphql GitHub organization, it is entirely separate from GraphQL itself. In fact, it has utilities to conveniently retrieve values inside ordinary Phoenix controllers:

Get hands-on with 1200+ tech skills courses.