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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Lukas Fittl
August 26, 2016
Programming
1
630
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
The Easy Way to Persisting Data in React
https://github.com/lfittl/beatql
Lukas Fittl
August 26, 2016
Tweet
Share
More Decks by Lukas Fittl
See All by Lukas Fittl
How to Scale Postgres - Automation, Tuning & Sharding
lfittl
0
680
What's Missing for Postgres Monitoring
lfittl
0
270
A Map For Monitoring PostgreSQL
lfittl
2
400
Monitoring Postgres at Scale
lfittl
1
470
Monitoring PostgreSQL at Scale
lfittl
4
280
Postgres Performance for App Developers
lfittl
2
320
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
620
PostgreSQL at a Web Startup
lfittl
3
610
Advanced pg_stat_statements: Filtering, Regression Testing & more
lfittl
4
810
Other Decks in Programming
See All in Programming
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
230
Rethinking API Platform Filters
vinceamstoutz
0
150
仕様漏れ実装漏れをなくすトレーサビリティAI基盤のご紹介
orgachem
PRO
7
3.1k
20260315 AWSなんもわからん🥲
chiilog
2
170
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
240
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
770
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
140
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.1k
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
230
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
190
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
140
PHP 7.4でもOpenTelemetryゼロコード計装がしたい! / PHPerKaigi 2026
arthur1
1
390
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
1.9k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
84
The Curse of the Amulet
leimatthew05
1
10k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
790
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
160
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
54k
Designing for humans not robots
tammielis
254
26k
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