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
Exploring GraphQL
Search
Marc-Andre Giroux
March 09, 2017
Programming
310
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Exploring GraphQL
Marc-Andre Giroux
March 09, 2017
More Decks by Marc-Andre Giroux
See All by Marc-Andre Giroux
It Depends - Examining GraphQL Myths & Assumptions
xuorig
0
140
So you Want to Distribute your GraphQL Schema?
xuorig
4
880
So you Want to Distribute your GraphQL Schema?
xuorig
0
690
GraphQL Schema Design @ Scale
xuorig
5
2.2k
Continuous Evolution of GraphQL Schemas @ GitHub
xuorig
3
2.2k
GraphQL à Shopify
xuorig
0
290
GraphQL @ Shopify
xuorig
6
1.8k
GraphQL on Rails
xuorig
2
400
From REST to GraphQL
xuorig
9
1.3k
Other Decks in Programming
See All in Programming
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
190
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1k
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
180
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
190
Oxcを導入して開発体験が向上した話
yug1224
4
340
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
200
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
270
さぁV100、メモリをお食べ・・・
nilpe
0
160
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
320
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
410
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
140
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
130
Featured
See All Featured
Ethics towards AI in product and experience design
skipperchong
2
320
Into the Great Unknown - MozCon
thekraken
41
2.6k
Amusing Abliteration
ianozsvald
1
210
The Language of Interfaces
destraynor
162
27k
Context Engineering - Making Every Token Count
addyosmani
9
990
A Soul's Torment
seathinner
6
3k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
1.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Practical Orchestrator
shlominoach
191
11k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Transcript
Exploring GraphQL Marc-André Giroux @__xuorig__
None
None
None
@__xuorig__ REST APIs are Great.
@__xuorig__ Except when they're not.
@__xuorig__ Multiple round-trips are not ideal.
@__xuorig__ GET /people/1 GET /planet/2 GET /film/3
@__xuorig__ SELECT * FROM /ENDPOINT
@__xuorig__ GET /people/1 { "person": { "name": "luke" } }
@__xuorig__ { "name": "Luke Skywalker", "height": "172", "mass": "77", "hair_color":
"blond", "skin_color": "fair", "eye_color": "blue", "birth_year": "19BBY", "gender": "male", "homeworld": "http://swapi.co/api/ planets/1/", "films": [ "http://swapi.co/api/films/6/", "http://swapi.co/api/films/3/", "http://swapi.co/api/films/2/", "http://swapi.co/api/films/1/", "http://swapi.co/api/films/7/" ],
@__xuorig__ What do clients even use?
@__xuorig__ { "name": "Luke Skywalker", "height": "172", "mass": "77", "hair_color":
"blond", "skin_color": "fair", "eye_color": "blue", "birth_year": "19BBY", "gender": "male", "homeworld": "http://swapi.co/api/ planets/1/", "films": [ "http://swapi.co/api/films/6/", "http://swapi.co/api/films/3/", "http://swapi.co/api/films/2/", "http://swapi.co/api/films/1/", "http://swapi.co/api/films/7/" ],
GraphQL
@__xuorig__ A special type of database.
@__xuorig__ A library.
@__xuorig__ A Query Langage.
@__xuorig__ &
@__xuorig__ A Spec for servers to execute GraphQL Queries.
@__xuorig__ A GraphQL Hello World.
@__xuorig__ query { film { title } }
@__xuorig__ Anatomy of a GraphQL Query
@__xuorig__ query MyQuery { film { title } }
@__xuorig__ query MyQuery { film { title } } Operation
Type
@__xuorig__ query MyQuery { film { title } } Operation
Name
@__xuorig__ query MyQuery { film { title } } Selection
Set
@__xuorig__ query MyQuery { film { title } } Field
@__xuorig__ • Lexed • Parsed • Validated • Executed
@__xuorig__ "data": { "film": { "title": "A New Hope" }
}
@__xuorig__ query { film(id: "123") { title } }
@__xuorig__ query { film(id: "123") { title characters { name
} } }
@__xuorig__ "data": { "film": { "title": "A New Hope", "characters":
[ { "name": "Luke Skywalker" }, { "name": "Princess Leia" } ] } }
@__xuorig__ The Type System.
@__xuorig__ { film(id: "123") { title characters { name }
} }
@__xuorig__ { film(id: "123") { title characters { name }
} } type QueryRoot { film(id: ID!): Film }
@__xuorig__ { film(id: "123") { title characters { name }
} } type Film { title: String! characters: [Character!]! }
@__xuorig__ { film(id: "123") { title characters { name }
} } type Character { name: String! }
@__xuorig__ Introspection.
@__xuorig__ { __schema { types { name } } }
@__xuorig__ { __type(name: "Film") { name description } }
@__xuorig__ Introspection == Clients with Super Powers
@__xuorig__ • AutoComplete • Client side validation • IDE Integration
• Code Generation
@__xuorig__ GraphiQL
@__xuorig__
@__xuorig__ swapi-graphql-ruby.herokuapp.com
Mutations
@__xuorig__ mutation { addFilm(name: "StarWars 8") { title } }
Fragments
@__xuorig__ query { film(id: "123") { title characters { name
} } bestRatedfilm { title characters { name } } }
@__xuorig__ query { film(id: "123") { title characters { name
} } bestRatedfilm { title characters { name } } }
@__xuorig__ fragment filmFragment on Film { title characters { name
} }
@__xuorig__ query { film(id: "123") { ...filmFragment } bestRatedfilm {
...filmFragment } } fragment filmFragment on Film { title characters { name } }
@__xuorig__ Versioning
@__xuorig__ Versioning Continuous Evolution
@__xuorig__ What about Security ?
@__xuorig__ • Maximum Depth • Query Complexity • Timeout
@__xuorig__ My HTTP Caching :( !
@__xuorig__ • Client Side Cache • Persisted Queries
@__xuorig__ GraphQL is Great.
@__xuorig__ A single roundtrip to fetch exactly what a client
needs.
@__xuorig__ Declarative and predictable. (no more SELECT *)
@__xuorig__ Servers express possibilities.
@__xuorig__ Clients define requirements.
@__xuorig__ That's real separation of concerns!
@__xuorig__ Great developer experience.
@__xuorig__ It makes us ship faster.
@__xuorig__ An everyone is happy.
Thank you! Marc-André Giroux @__xuorig__