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
GraphQL
Search
Radoslav Stankov
August 15, 2015
Technology
1.2k
7
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GraphQL
Video:
https://www.youtube.com/watch?v=T2cucknCd6M
Radoslav Stankov
August 15, 2015
More Decks by Radoslav Stankov
See All by Radoslav Stankov
Building LLM Powered Features
rstankov
0
150
Tips for Tailwind CSS
rstankov
0
58
Building LLM Powered Features (lightning talk)
rstankov
0
74
All you need is CSS
rstankov
0
150
Ruby on Rails The Single Engineer Framework
rstankov
0
59
Rails: The Missing Parts
rstankov
1
260
The dream that turned into nightmare
rstankov
0
330
The dream that turned into nightmare (lightning)
rstankov
0
140
Ruby on Rails - The Single Engineer Framework
rstankov
0
360
Other Decks in Technology
See All in Technology
小さくはじめるSLI/SLO ~育てながら組織に定着させる実践知~ / Starting Small with SLI/SLOs: Building Adoption Through Continuous Growth
nari_ex
7
1.9k
自律型AIエージェントは何を破壊するのか
kojira
0
160
現地で盛り上がった WWDC26 Keynote
zozotech
PRO
1
250
Android の公式 Skill / Android skills
yanzm
0
150
中期計画、2回作ってみた ~業務委託と正社員、両方の視点から~
demaecan
1
750
やさしいA2A入門
minorun365
PRO
12
1.9k
2026TECHFRESH畢業分享會 - Lightning Talk - E起 See See : 電商推薦讀心術? 數據說了算
line_developers_tw
PRO
0
1k
小さく始める AI 活用推進 ― 日経電子版 Web チームの事例/nikkei-tech-talk47
nikkei_engineer_recruiting
0
270
2026.06.13_AI時代に事業会社が「SIer出身エンジニア」を求める理由 / Why Businesses Seek Engineers with a System Integrator Background in the AI Era
jumtech
0
1.1k
2026TECHFRESH畢業分享會 - Lightning Talk - 資料也要 CI/CD? 用 Airbyte 自動化資料同步
line_developers_tw
PRO
0
1k
脆弱性対応、どこで線を引くか
rymiyamoto
1
390
マルチアカウント環境での コーディングエージェントを使った障害調査が大変なので AIエージェントにReadOnly権限を付与してみた / ReadOnly AI Agents for Multi-Account AWS Incident Response
yamaguchitk333
2
100
Featured
See All Featured
Building the Perfect Custom Keyboard
takai
2
790
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
720
Marketing to machines
jonoalderson
1
5.4k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
480
Odyssey Design
rkendrick25
PRO
2
700
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
A Soul's Torment
seathinner
6
2.9k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Documentation Writing (for coders)
carmenintech
77
5.4k
Transcript
GraphQL Radoslav Stankov 15/08/2015
Radoslav Stankov @rstankov http://rstankov.com http://blog.rstankov.com http://github.com/rstankov
None
None
None
None
https://github.com/rstankov/it-tour
None
None
None
None
None
GET /api/events/15/sessions { id: 175, start_at: "11:00", title: "GraphQL", speaker_id:
1, track: 2, }
None
None
GET /api/speakers/1 { id: "1", name: "Radoslav Stankov" }
Rest Client Rest Server
Rest Client Rest Server /api/event/15/sessions
Rest Client Rest Server /api/event/15/sessions /api/speakers/{x} (for 13 speakers)
Rest Client Rest Server /api/event/15/sessions /api/speakers/{x} (for 13 speakers)
…approach 2
GET /api/events/15/sessions { id: 175, start_at: "11:00", title: "GraphQL", track:
2, speaker: { id: 1, name: "Radoslav Stankov" } }
None
None
None
None
None
GET /api/events/15/sessions { id: 175, start_at: "11:00", title: "GraphQL", track:
2, speaker: { id: 1, name: "Radoslav Stankov", photo: "/speaker/photo/1/thumb.jpg" } }
…but over time
{ id: 175, start_at: "11:00", title: "GraphQL", track: 2, description:
"... stuff about Rado", speaker: { id: 1, name: "Radoslav Stankov", photo: "/speaker/photo/1/thumb.jpg", big_photo: "/speaker/photo/1/big.jpg", description: "... stuff about Rado", links: [ "http://rstankov.com", "http://blog.rstankov.com", "http://producthunt.com", ], GET /api/events/15/sessions
id: 175, start_at: "11:00", title: "GraphQL", track: 2, description: "...
stuff about Rado", speaker: { id: 1, name: "Radoslav Stankov", photo: "/speaker/photo/1/thumb.jpg", big_photo: "/speaker/photo/1/big.jpg", description: "... stuff about Rado", links: [ "http://rstankov.com", "http://blog.rstankov.com", "http://producthunt.com", ], alabla1: "foo bar", alabla2: "foo bar", alabla3: "foo bar" }, alabla1: "foo bar", alabla2: "foo bar", alabla3: "foo bar" } GET /api/events/15/sessions
None
…approach 3
None
Rest Client Rest Server
Rest Client Rest Server endpoint 1 feature 1
Rest Client Rest Server endpoint 1 feature 1 endpoint 2
feature 2
Rest Client Rest Server endpoint 1 feature 1 endpoint 2
feature 2 endpoint 3 feature 3
Rest Client Rest Server endpoint 1 feature 1 endpoint 2
feature 2 endpoint 3 feature 3 endpoint N feature N
None
None
None
None
{ id: 175, start_at: "11:00", title: "GraphQL", track: 2, speaker:
{ id: 1, name: "Radoslav Stankov", photo: "/speaker/photo/1/thumb.jpg" } }
{ id start_at title track speaker: { id name photo
} }
None
GET /graphql Request Body Response Body
{ event(id: 15) { sessions { id start_at title
track speaker { id name picture } } } } GET /graphql Request Body Response Body
{ event(id: 15) { sessions { id start_at title
track speaker { id name picture } } } } GET /graphql Request Body Response Body
{ event(id: 15) { sessions { id start_at title
track speaker { id name picture } } } } { "data": { "event": { "sessions": [{ "id": 175, "start_at": "11:00", "title": "GraphQL", "track": 2, "speaker": { "id": 1, "name": "Rado", "picture": null } }] } } } GET /graphql Request Body Response Body
It is that simple
https://facebook.github.io/graphql
GraphQL is a query language created by Facebook in 2012
which provides a common interface between the client and the server for data fetching and manipulations. The client asks for various data from the GraphQL server via queries.
Architecture GraphQL Library (Per-Language) Type Definitions Application
Code
GraphQL • Single endpoint • Not just a library •
Application-Layer Protocol • Server agnostic • Strongly-typed • Client-specified queries • Hierarchical
Tries to solve • N+1 API queries • API response
bloat • Documentation • Ad Hoc Endpoints • Structure issues
https://facebook.github.io/react
https://facebook.github.io/relay
None
Query { event(id: 15) { sessions { id start_at
title track speaker { id name picture } } } }
Query { event(id: 15) { sessions { id start_at
title track speaker { id name picture } } } } { "data": { "event": { "sessions": [{ "id": 175, "start_at": "11:00", "title": "GraphQL", "track": 2, "speaker": { "id": 1, "name": "Rado", "picture": null } }] } } }
Mutation mutation RootMutationType { createSpeaker(name: "Rado") { id }
} { "data": { "createSpeaker": { "id": 2 } } }
Documentation { __schema { types { name fields {
name type { name kind ofType { name kind } } } } } } { "data": { "__schema": { "types": [{ "name": "RootQueryType", "fields": [ { "name": "events", "type": { "name": null, "kind": "LIST", "ofType": { "name": "Event", "kind": "OBJECT" } } }, { "name": "event", "type": {
{ id start_at title track speaker: { id name smallPhoto:
photo(size: 100) bigPhoto: photo(size: 400) } } Cool tricks
query withFragments { user(id: 4) { friends(first: 10) { ...friendFields
} mutualFriends(first: 10) { ...friendFields } } } fragment friendFields on User { id name profilePic(size: 50) } Cool tricks
Demo
Issues • New, just a draft specification • No reliable
graphql server libraries, yet • No reliable graphql client libraries, yet • Mutations are weird • Best practices and solutions • Large datasets
None
None
http://jsonapi.org/
{ "links": { "self": "http://example.com/events/15/sessions", "next": "http://example.com/events/15/sessions?page[offset]=2", "last": "http://example.com/events/15/sessions?page[offset]=10" },
"data": [{ "type": "sesssion", "id": "175", "attributes": { "title": "GraphQL", "track": "2", "start_at": "11:00" }, "relationships": { "speaker": { "links": { "self": "http://varnaconf.com/sessions/175/relationships/speaker", "related": "http://varnaconf.com/speaker/1" }, "data": { "type": "speaker", "id": "1" } }, }, "links": { "self": "http://example.com/sessions/175" } }],
"attributes": { "title": "GraphQL", "track": "2", "start_at": "11:00" }, "relationships":
{ "speaker": { "links": { "self": "http://varnaconf.com/sessions/175/relationships/speaker", "related": "http://varnaconf.com/speaker/1" }, "data": { "type": "speaker", "id": "1" } }, }, "links": { "self": "http://example.com/sessions/175" } }], "included": [{ "type": "speaker", "id": "1", "attributes": { "name": "Radoslav Stankov", "picture": "/photos/1/small.jpg", }, "links": { "self": "http://varnaconf.com/speaker/1" } }]
https://speakerdeck.com/rstankov/graphql
https://github.com/rstankov/talks-code
None
None
@rstankov Thanks :)
Questions?