Intro to Data Loaders in GraphQL | Solve the N+1 Problem with NodeJS (#03) | 🟢 Beginner Level
Rowadz
0:00 / 0:00
Intro to Data Loaders in GraphQL | Solve the N+1 Problem with NodeJS (#03) | 🟢 Beginner Level
831 просмотр · 2 года назад
Rowadz
22,7 тыс. подписчиков
831 просмотр · 2 года назад
In this video, we explore the N+1 query problem in GraphQL and how to solve it with Data Loaders in a Node.js + TypeScript setup.
We also build our first batch loader using real data from the JSONPlaceholder API.
🔧 Note: It’s a good idea to pass your data loaders via GraphQL context (something I forgot in the video!)
Reference → https://the-guild.dev/graphql/yoga-se...
📂 Code Repo:
https://github.com/Rowadz/graphql-yt
📺 Playlist:
• GraphQL
📄 Slides:
https://docs.google.com/presentation/...
🔗 JSONPlaceholder API:
https://jsonplaceholder.typicode.com/
🎥 More from Lee Byron:
/ @leebyronw
⏱️ Timestamps:
00:00 The N + 1 query problem
01:02 Intro to Data Loaders and why to use them
07:30 Creating our first data loader to batch requests
18:06 More complex loader example
#graphql #graphqlapi #graphqlyoga