Use GraphQL Data Loaders to Prevent Scaling Issues by Batching & Caching Database Requests

12m
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
4.5
55
people completed
Bookmark
Download
RSS

Most developers would raise an eyebrow if they saw database queries being done in a for-loop, but GraphQL provides just enough abstraction that it isn't always intuitive exactly how many times each resolver fires at scale, nor is it obvious how to batch operations efficiently and still return the correct results to the correct consumer.

You'll learn how to use the GraphQL Data Loader pattern to improve the performance of your application, and solve scaling issues before they become a problem.

To do this, we'll first implement our own naive version of the pattern to understand why the API is shaped how it is. Then we will switch over to the official DataLoader package and explore the benefits further.

Skills you'll Gain

  • Implement a cache layer to optimize your requests
  • Batch requests so your Database isn't overloaded
  • Build a performant GraphQL API

Instructor

Jacob Paris

During the winter season, you can find me on the slopes every morning.

Working for North American companies from European time zones means I can wake up slowly with time for coffee, food, errands, and sports.

And then I'm focused and ready to settle in to work from the early afternoon straight on until the evening.

Course content (10 lessons)

    illustration for Use GraphQL Data Loaders to Prevent Scaling Issues by Batching & Caching Database Requests