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
Getting started with GraphQL
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Thiago Colares
November 24, 2017
Technology
400
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
More Decks by Thiago Colares
See All by Thiago Colares
How pgvector extends PostgreSQL
thicolares
0
18
Functional programming: basic concepts you can start using today
thicolares
0
52
O básico que ainda deveríamos entender sobre Unicode e encondings
thicolares
0
430
The pragmatic agilist
thicolares
0
430
The Pragmatic Agilist
thicolares
0
40
Domain-Driven Design com PHP
thicolares
0
470
Other Decks in Technology
See All in Technology
テスト設計の本質を改めて考えてみる~生成AIを活用する時代だからこそ、作ったテストの説明性を高めよう~
yamasaki696
1
110
フルAIで個人開発して学んだあれこれ / yuruai vol.1
isaoshimizu
0
150
4人目のSREはAgent
tanimuyk
0
270
コミットの「なぜ」を読む
ota1022
0
120
徹底討論!ECS vs EKS!
daitak
3
1.8k
「軸足」は 固定しなくていい - 熱量と強みで描く、しなやかなキャリアの形
kakehashi
PRO
1
280
從開發到部署全都交給 AI:實作 AI 驅動的自動化流程
appleboy
0
180
5分でわかる Amazon Connect_20260608
hwangbyeonghun
0
130
AIチャットの改善から見えた、良いAI体験とは / What Constitutes a Good AI Experience: Insights from Improving AI Chat
kubode
0
120
BPaaSで進むAIオペレーションの現在地 AI実装が効く領域とスケーラビリティの選定と実装
kentarofujii
0
210
2026 AI Memory Architecture
nagatsu
0
530
Agile and AI Redmine Japan 2026
hiranabe
4
500
Featured
See All Featured
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
170
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
170
Making Projects Easy
brettharned
120
6.7k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
ラッコキーワード サービス紹介資料
rakko
1
3.7M
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
310
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
590
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
420
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
250
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Transcript
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