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
66
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
95
Introduction to Flask
ngalambackend
0
210
Achieving API Performance and Scalability
ngalambackend
0
100
Interfaces in Go
ngalambackend
0
98
CSS in JS in action
ngalambackend
0
63
Productive Remote Working with Scrum
ngalambackend
0
110
Covid Tracker Kota Malang
ngalambackend
0
75
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
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
1
150
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
170
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
280
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
720
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
1.9k
SREの越境 / SRE Collaboration
y0hgi
2
220
XHTMLが残したもの
yosuke_furukawa
PRO
2
810
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1k
AHC070解法紹介
eijirou
0
120
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2k
iOSDC2026登壇資料.pdf
riofujimon
0
170
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
3k
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
The Cult of Friendly URLs
andyhume
79
7k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
520
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
470
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
Between Models and Reality
mayunak
4
460
Visualization
eitanlees
152
17k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
540
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.8k
Ruling the World: When Life Gets Gamed
codingconduct
0
330
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
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