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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Lukas Fittl
August 26, 2016
Programming
1
610
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
670
What's Missing for Postgres Monitoring
lfittl
0
260
A Map For Monitoring PostgreSQL
lfittl
2
390
Monitoring Postgres at Scale
lfittl
1
460
Monitoring PostgreSQL at Scale
lfittl
4
270
Postgres Performance for App Developers
lfittl
2
310
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
600
PostgreSQL at a Web Startup
lfittl
3
600
Advanced pg_stat_statements: Filtering, Regression Testing & more
lfittl
4
800
Other Decks in Programming
See All in Programming
並行開発のためのコードレビュー
miyukiw
0
160
CSC307 Lecture 02
javiergs
PRO
1
780
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
570
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
280
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
700
Patterns of Patterns
denyspoltorak
0
1.4k
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
200
Oxlint JS plugins
kazupon
1
960
高速開発のためのコード整理術
sutetotanuki
1
400
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
Crafting Experiences
bethany
1
49
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
69
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
93
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Testing 201, or: Great Expectations
jmmastey
46
8k
The agentic SEO stack - context over prompts
schlessera
0
640
Prompt Engineering for Job Search
mfonobong
0
160
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
66
Technical Leadership for Architectural Decision Making
baasie
1
240
The browser strikes back
jonoalderson
0
370
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
420
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