Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
Search
Lukas Fittl
August 26, 2016
Programming
650
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
The Easy Way to Persisting Data in React
https://github.com/lfittl/beatql
Lukas Fittl
August 26, 2016
More Decks by Lukas Fittl
See All by Lukas Fittl
How to Scale Postgres - Automation, Tuning & Sharding
lfittl
0
690
What's Missing for Postgres Monitoring
lfittl
0
290
A Map For Monitoring PostgreSQL
lfittl
2
410
Monitoring Postgres at Scale
lfittl
1
500
Monitoring PostgreSQL at Scale
lfittl
4
290
Postgres Performance for App Developers
lfittl
2
340
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
640
PostgreSQL at a Web Startup
lfittl
3
630
Advanced pg_stat_statements: Filtering, Regression Testing & more
lfittl
4
830
Other Decks in Programming
See All in Programming
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
130
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
Webフレームワークの ベンチマークについて
yusukebe
0
200
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
830
どこまでゆるくて許されるのか
tk3fftk
0
380
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
120
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
180
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1k
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
290
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.7k
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
210
Performance Engineering for Everyone
elenatanasoiu
0
260
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
750
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
670
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
340
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Designing for Performance
lara
611
70k
Building AI with AI
inesmontani
PRO
1
1.1k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
410
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
440
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Practical Orchestrator
shlominoach
191
11k
Transcript
GraphQL ❤ PostgreSQL The Easy Way to Persisting Data in
React @LukasFittl
Lets talk about State
https://xkcd.com/1653/
State
State State State State
State State State State State State State
State Store
State Store “The Server”
Serverless != Stateless
“The Server” “The Server” “The Server”
“The Server” “The Database” “The Server” “The Server”
“The Server” “The Database” “The Server” “The Server”
<===> State <===> <===>
Picking a Database
MySQL MongoDB PostgreSQL CockroachDB RethinkDB Cassandra Dynamo
MySQL MongoDB PostgreSQL CockroachDB RethinkDB Cassandra Dynamo
Why PostgreSQL?
1. Fast & Reliable 2. Deploy Anywhere 3. 100% Open
Source, Community Included Why PostgreSQL?
1. Fast & Reliable 2. Deploy Anywhere 3. 100% Open
Source, Community Included Why PostgreSQL?
1. Fast & Reliable 2. Deploy Anywhere 3. 100% Open
Source, Community Included Why PostgreSQL?
Advanced Query Planner It also has: UPSERT Complex Types JSONB
JOINs Window Functions CTEs High Availability LISTEN/NOTIFY
What We’re Going To Build
Dashboards & Stuff
Dashboards & Stuff
None
github.com/ FormidableLabs/react-music
None
Lets build a GraphQL Backend for react-music
GraphQL + PostgreSQL + react-music = BeatQL github.com/lfittl/beatql
Choosing a Backend Library
graphql-js + pg-promise
graphql-ruby + pg
postgraphql https://github.com/calebmer/postgraphql
[ $ new library ]
[ $ new library ]
graphql-js + pg-promise + dataloader
Figuring Out The Schema
Songs, Sequencers, Instruments
SQL!
None
None
None
None
GraphQL!
None
None
None
Sample Data
None
Based On relay-starter-kit
github.com/lfittl/beatql
data/
data/database.js
None
None
None
None
data/schema.js
None
None
None
None
Getting Only The Data You Need
None
None
None
None
data/database-helpers.js
Avoiding N+1 Queries
DataLoader!
None
data/database-helpers.js
client/
client/components/ App.js
None
None
[ Demo ]
@LukasFittl github.com/lfittl/beatql FormidableLabs/react-music