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 ❤ PostgreSQL -- P.S. aka BeatQL
Search
Lukas Fittl
August 26, 2016
Programming
670
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
Transcript
78 slides
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
More Decks by Lukas Fittl
See All by Lukas Fittl
How to Scale Postgres - Automation, Tuning & Sharding
lfittl
0
710
What's Missing for Postgres Monitoring
lfittl
0
320
A Map For Monitoring PostgreSQL
lfittl
2
430
Monitoring Postgres at Scale
lfittl
1
520
Monitoring PostgreSQL at Scale
lfittl
4
310
Postgres Performance for App Developers
lfittl
2
360
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
660
PostgreSQL at a Web Startup
lfittl
3
660
Advanced pg_stat_statements: Filtering, Regression Testing & more
lfittl
4
860
Other Decks in Programming
See All in Programming
Modernizing iOS Apps
seyfoyun
0
150
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
170
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
160
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
140
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
250
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
1
430
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
340
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
1.2k
ActionController meets Protocol Buffers
sorah
1
800
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
220
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
280
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
1
200
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
300
Technical Leadership for Architectural Decision Making
baasie
4
640
Everyday Curiosity
cassininazir
0
400
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
370
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
6
920
The Cult of Friendly URLs
andyhume
79
7.1k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
430
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
What's in a price? How to price your products and services
michaelherold
247
13k