Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Solve N+1 Problem in GraphQl API
Search
Ngalam Backend Community
April 28, 2019
Programming
67
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Solve N+1 Problem in GraphQl API
Ngalam Backend Community
April 28, 2019
More Decks by Ngalam Backend Community
See All by Ngalam Backend Community
Web_Scraping_with_Scrapy.pdf
ngalambackend
0
100
Introduction to Flask
ngalambackend
0
210
Achieving API Performance and Scalability
ngalambackend
0
100
Interfaces in Go
ngalambackend
0
110
CSS in JS in action
ngalambackend
0
72
Productive Remote Working with Scrum
ngalambackend
0
110
Covid Tracker Kota Malang
ngalambackend
0
76
Supercharge Local Development with Docker
ngalambackend
1
150
Building Scalable and Flexible API by Leveraging GraphQL and BigTable
ngalambackend
1
350
Other Decks in Programming
See All in Programming
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
2
110
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
190
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
150
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
240
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
4
1.5k
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1.9k
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
330
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
200
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
640
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
290
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
200
Getting Started with Vibe Coding
miccheng
0
200
Featured
See All Featured
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
770
Abbi's Birthday
coloredviolet
4
11k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Why Our Code Smells
bkeepers
PRO
340
58k
Claude Code のすすめ
schroneko
67
230k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
480
Raft: Consensus for Rubyists
vanstee
143
7.9k
4 Signs Your Business is Dying
shpigford
187
23k
Navigating Weather and Climate Data
rabernat
0
590
Music & Morning Musume
bryan
48
7.5k
KATA
mclloyd
PRO
35
16k
Prompt Engineering for Job Search
mfonobong
0
580
Transcript
Solve N+1 Problem in GraphQL API Disyam Adityana Putra Team
Leader @ Hash Rekayasa Teknologi
Ask The Audience • Raise Your Hand • Know GraphQL
• Try GraphQL • Use GraphQL
N+1 Problem
dataloader to the rescue
dataloader • batching • caching • per request • fetch
data modification
dataloader const DataLoader = require('dataloader') const userLoader = new DataLoader(keys
=> myBatchGetUsers(keys));
dataloader input = [2, 1, 5, 3, 4]; output =
[ { id: 2, name: "two" }, { id: 1, name: "one" }, { id: 5, name: "five" } { id: 3, name: "three" } { id: 4, name: "four" } ];
batching • The Array of values must be the same
length as the Array of keys • Each index in the Array of values must correspond to the same index in the Array of keys
caching const userLoader = new DataLoader(...) const result1 = await
userLoader.load(1) const result2 = await userLoader.load(1) assert(result1 === result2)
Other implementations PHP: DataLoaderPHP Ruby: Dataloader, BatchLoader ReasonML: bs-dataloader Java:
java-dataloader Elixir: dataloader Golang: Dataloader
Question?
Thank You code: https://github.com/disyam/graphql-loader