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
Getting started with GraphQL
Search
Thiago Colares
November 24, 2017
Technology
420
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Getting started with GraphQL
The 4th Weekly company-internal Agilize DevTalk of November, 2017.
Thiago Colares
November 24, 2017
Transcript
30 slides
GETTING STARTED WITH GraphQL Agilize Cloud Accounting, 24/11/2017 Weekly company-internal
DevTalks
Hallo! I’M THIAGO COLARES Agile manager Full stack developer Open
source Co-founder @ Agilize Cloud Accounting @thicolares
1. DEFINE: GraphQL
WHAT IS GRAPHQL ◦ Declarative data fetching ◦ Alternative to
REST ◦ Single endpoint → responds to queries
/authors/<id> /authors/<id>/books /authors/<id>/followers 3 ENDPOINTS
query query query 1 SINGLE ENDPOINT
DEMO 1
2. CHARACTERISTICS
GraphQL TIMELINE ◦ Developed by Facebook on 2012 ◦ Presented
→ React.js Conf 2015 ◦ Is not for React Developers ◦ Other companies had the same initiative ◦ Netflix → Falcor ◦ Cousera → Now uses GraphQL
REST CHALLENGES ◦ Need for efficient data loading (mobile) ◦
Variety of different frontend frameworks ◦ Rapid feature development
GraphQL BENEFITS ◦ No mover over or underfetching ◦ Almost
non API if the interface changes ◦ Faster feedbacks cycles
INSIGHTFUL ANALYTICS ◦ Fine-grained info about what read data ◦
Evolving and deprecating API
3. KEY CONCEPTS
type Query { ... } type Mutation { ... }
type Subscription { ... } ROOT TYPE
query { User(id: 123) { name posts { title }
} } QUERY HTTP POST
{ "data": { "User": { "name": "Joston Muriel", "posts": [
{title: "Hello, it's me"} {title: "Lines in the sand"} ] } } } RESPONSE RESPONSE
SCHEMA ◦ Strong type system ◦ Schema as client-server contract
◦ Client and server can work independently ◦ Schema Definition Language
type Person { name: String! age: Int! } DEFINING SIMPLE
TYPES ! → required
type Person { name: String! age: Int! } ADDING A
RELATION type Post { title: String! author: Person! }
type Person { name: String! age: Int! posts: [Post!]! }
ADDING A HAS-MANY RELATION type Post { title: String! author: Person! }
DEMO 2
4. MUTATIONS
WRITING DATA WITH MUTATIONS ◦ A query too ◦ You
can ask for the returning fields ◦ Even nested ones
3 KINDS OF MUTATIONS ◦ creating new data ◦ updating
existing data ◦ deleting existing data
A MUTATION mutation { createPerson(name: "Bob", age: 36) { name
age } } Similar syntax. Mutation keyword. Special root field.
DEFINING A MUTATION type Mutation { createPerson(name: String!, age: String!)
Person! ... }
5. NODE EXAMPLE
DEMO 3
“ Nescit cedere
THANKS! Thiago Colares @thicolares
More Decks by Thiago Colares
See All by Thiago Colares
How pgvector extends PostgreSQL
thicolares
0
50
Functional programming: basic concepts you can start using today
thicolares
0
92
O básico que ainda deveríamos entender sobre Unicode e encondings
thicolares
0
470
The pragmatic agilist
thicolares
0
470
The Pragmatic Agilist
thicolares
0
42
Domain-Driven Design com PHP
thicolares
0
500
Other Decks in Technology
See All in Technology
OpenTelemetryで変わった 新時代のCloudWatchメトリクス監視
tsukuboshi
0
370
Shared Signals Framework 仕様解説
oidfj
0
460
E2E Test というハーネス — AI時代の自動テスト民主化
daishukojima
9
4.3k
SSFの現在地 ― CAEP/RISCからAI Identityへ
oidfj
0
460
エンタープライズ事業未経験のデータ屋、 AI時代にN回撃沈する.pdf
ryoskdara_
0
140
さようならSSH鍵、こんにちはゼロトラスト ― AIフレンドリーで快適な自宅鯖SSH
atalie2m
13
6.5k
AIで実装が加速したのに、 なぜ私は仕事の大半で人と話し続けていたのか?
say_no_w
0
170
契約書SaaSにAIエージェントを組み込む
sansantech
PRO
0
170
AI対話型分析を作成し、リリースするまでの話 / The Road to Release: Buiding AI Conversational Analytics
yappli_developers
0
150
パスワードのない鍵で、 データを手元に置く
ginjihayashi
0
220
AI時代における医療情報システムのセキュリティ / Security of Healthcare IT Systems in the AI Era
henryofficial
0
180
Sonnetだけで業務はまわる?
kintotechdev
1
140
Featured
See All Featured
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
6
930
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
660
Digital Ethics as a Driver of Design Innovation
axbom
PRO
2
530
Highjacked: Video Game Concept Design
rkendrick25
PRO
2
580
Darren the Foodie - Storyboard
khoart
PRO
5
4.1k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
400
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
770
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
580
From π to Pie charts
rasagy
1
450
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.8k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k