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
GraphQL DataLoader 적용하기
Search
angelxtry
February 08, 2020
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GraphQL DataLoader 적용하기
angelxtry
February 08, 2020
Other Decks in Programming
See All in Programming
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
370
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
1k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
880
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
270
Agents on Rails - Rails at Scale 2026
irinanazarova
0
560
Domain-Driven Transformation
hschwentner
2
2.3k
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.6k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.4k
Designing for humans not robots
tammielis
254
26k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
280
New Earth Scene 8
popppiees
4
2.7k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
410
So, you think you're a good person
axbom
PRO
2
2.2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
340
Typedesign – Prime Four
hannesfritz
42
3.2k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Transcript
GraphQL DataLoader 2020.02.08 doit team ࣻഐ https://github.com/angelxtry
TL; DR GraphQLਸ بੑ೮ݶ DataLoaderܳ ਊೞࣁਃ. فߣ ೞࣁਃ.
Teck stack
GraphQL
GraphQL ػ(nested) ࠁܳ োझۣѱ ۽٘ೡ ࣻ .
GraphQL ػ(nested) ࠁܳ োझۣѱ ۽٘ೡ ࣻ .
None
None
GraphQL ػ(nested) ࠁܳ োझۣѱ ۽٘ೡ ࣻ .
None
ޙઁߊࢤ
dummy data 50 user full data
וܻ. ৵? ۽Ӓܳ ࠁ! ۽Ӓܳ!
۽Ӓо ցޖ ݆ই! query query query query query query query
query query query query query query query query query query query query query query
ࠗఠ द! 10 user data + motivations data ઑഥ
۽Ӓܳ ࠁ! ۽Ӓܳ!
য?!?! user * 1 + motivaions * 10 = 11(?)
user * 1 + table 6 * user 50 =
301(!!)
N+1 Problem
users user user user user user Select
users user user user user user m m m m
m Select Select Select Select Select Select
যڌѱ ೧Ѿ೮աਃ?
DataLoader
DataLoader is a generic utility to be used as part
of your application’s data fetching layer to provide a simplified and consistent API over various remote data sources such as databases or web services via batching and caching.
users user user user user user 1 User ప࠶ select
key key key key key DataLoader users user user user
user user 2 DataLoaderী key 1 User ప࠶ select
key key key key key DataLoader val val val val
val users user user user user user Select 3 Motivations table select 2 DataLoaderী key 1 User ప࠶ select
key key key key key DataLoader val val val val
val users user user user user user m m m m m Select 4 User߹ Motivation ೡ 3 Motivations table select 2 DataLoaderী key 1 User ప࠶ select
userSchema.ts
userResolver.ts
DataLoader ਊ!
yarn add dataloader
userResolver.ts
userResolver.ts
userRepository.ts
userRepository.ts
ࢎ೦
ࢎ೦ 1
ࢎ೦ 2
ࢎ೦ 3
ޤо જইաਃ?
Select 2ߣ
500 user full data
Select 2ߣ
Postman 10ഥ ߈ࠂ प೯ റ 10ഥ ಣӐ प೯ ࣘب ஏ
Postman 10ഥ ߈ࠂ प೯ റ 10ഥ ಣӐ प೯ ࣘب ஏ
ਊ : 1318ms ਊ റ: 117ms
Ѿۿ
TL; DR GraphQLਸ بੑ೮ݶ DataLoaderܳ ਊೞࣁਃ. فߣ ೞࣁਃ.
ӟ ߊ ٜয࣊ࢲ хࢎפ! ߊ ղਊਸ ؊ ࠁҊ रਵदݶ? https://blog.doitreviews.com/development/
2020-02-04-graphql-typeorm-dataloader/ ۽ં ٘о ҾӘೞदݶ? https://github.com/codestates/healthFriend-server