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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
21
Functional programming: basic concepts you can start using today
thicolares
0
55
O básico que ainda deveríamos entender sobre Unicode e encondings
thicolares
0
430
The pragmatic agilist
thicolares
0
440
The Pragmatic Agilist
thicolares
0
40
Domain-Driven Design com PHP
thicolares
0
470
Other Decks in Technology
See All in Technology
「顧客の声を聞かなければ何も始まらない」 ── 顧客の声から生まれた『AI返信補助機能』の開発プロセス / AICon2026_shikata_imai
rakus_dev
1
280
生成 AI 時代にいま一度「問い合わせ」について考えてみる
kazzpapa3
1
130
データエンジニアリングとドメイン駆動設計
masuda220
PRO
14
2.6k
どこまでAIに任せるか 〜確率論と決定論の境界決定〜
shukob
0
510
Playwright × AI Agent でE2Eテストはどう変わるか AI駆動テストの可能性と実用検証の結果
taiga7543
2
860
StepFunctionsとGraphRAGを活用した暗黙知活用のためのRAG基盤
yakumo
0
170
reFACToring
moznion
0
270
AI工学特論: MLOps・継続的評価
asei
10
2.2k
MCPをつなげて作る組織横断のAIエージェント基盤
tsubakimoto_s
0
140
論語・武士道・産業革命から見る かわるもの、かわらないもの
ichimichi
6
680
『モデル + ハーネス』で読み解く AIエージェント入門
oracle4engineer
PRO
2
180
副作用のある Lambda でも Lambda Power Tuning は使えるのか / lambda-power-tuning-side-effects
koukihosaka
2
150
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Believing is Seeing
oripsolob
1
170
Optimizing for Happiness
mojombo
378
71k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
3
360
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
30 Presentation Tips
portentint
PRO
1
350
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
380
Designing Experiences People Love
moore
143
24k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
What's in a price? How to price your products and services
michaelherold
247
13k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.7k
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