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
Introduction à GraphQL
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
fdecampredon
April 07, 2016
Technology
1.2k
0
Share
Introduction à GraphQL
JS-Star meetup Paris
http://www.meetup.com/fr-FR/Js-Star/events/229601871/
fdecampredon
April 07, 2016
More Decks by fdecampredon
See All by fdecampredon
Reactive Programming et React
fdecampredon
3
190
Going Reactive with React
fdecampredon
1
560
Introduction à ReactJS
fdecampredon
0
69
Other Decks in Technology
See All in Technology
JTCでRedmine利用者2700人を実現した手法 第二部
nobuonakamura
0
140
AWS運用におけるAI Agent活用術 / JAWS-UG 神戸 #11 LT大会
genda
1
310
社内RAGの導入で気を付けたポイント
yakumo
1
130
"スキルファースト"で作る、AIの自走環境
subroh0508
0
630
20260515 OpenIDファウンデーション・ジャパンご紹介
oidfj
0
240
いつの間にかデータエンジニア以外の業務も増えていたけど、意外と経験が役に立ってる
zozotech
PRO
0
700
実践 TanStack Start ― 新規プロダクトを開発して確立した、サーバーとクライアント境界の設計パターン / Practical TanStack Start Server-Client Boundary Patterns
kaminashi
1
130
React Compiler導入から21ヶ月、いま始めるならこうやる
astatsuya
2
270
SpeechTranscriber + AIによる文字起こし機能
kazuki1220
0
120
可視化から活用へ — Mesh化・Segmentation・アライメントの研究動向
gpuunite_official
0
230
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.5k
20260515 ログイン機能だけではないアカウント管理を全体で考える~サービス設計者向け~
oidfj
1
860
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.6k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
A designer walks into a library…
pauljervisheath
211
24k
HDC tutorial
michielstock
2
660
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
300
Become a Pro
speakerdeck
PRO
31
5.9k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
810
Transcript
Introduction à GraphQL @fdecampredon JS Star Paris - 7/04/2016
Petite histoire de la communication client server
2005: AJAX est né
Au début c’était le chaos
Des milliers de possibilités • Web Services - SOAP •
Remote Object • JSON-RPC • Etc…
Et puis un winner : REST
Pourquoi REST ? • Stateless • Cacheable • « Standard
» • « Facile »
REST est parfait
Vraiment ?
Multiplication des devices = Multiplication des end points
Sur mobile, les vieux clients force à versioner les API
Et plus encore • Complexité à fetcher des objets complexes
sans effectuer de multiples requêtes • Pas de type et impossibilité d’introspection • Etc…
Et le cauchemar commence
Nouveaux problèmes = Nouvelle solution
GraphQL
GraphQL • Un language de Requête de données (et
pas de base données) • On « décrit » nos types de données sous forme d’un Graphe • On définit nos Requêtes sur le client
Comment Utiliser GraphQL
Définition des types sur le serveur
Un type system riche • Des Scalar : Boolean, String,
Int, Float, etc.. • Des « Object Types» • Des interfaces, enum, List, non-null type etc…
On crée ses requêtes sur le client
On récupère uniquement les données nécessaires
Quels sont les avantages ? • Hiérarchique • Centré sur
le Produit • Requêtes spécifiées sur le client • Plus de problèmes de backward compatibility • Type System • Introspection
GraphQL sur le client
Relay
Relay • Créer pour GraphQL • Permet à chaque composant
de définir les données dont il a besoin • Au coeur de la plupart des applications Facebook
Chaque composant définit les données dont il a besoin
On compose les requêtes comme on compose les composants
GraphQL sans Relay
On définit simplement ses requêtes dans ses « services »
Conclusion • REST pose de gros problèmes • GraphQL est
une nouvelle technologie permettant de remplacer REST • A utiliser avec ou sans Relay
François de Campredon @fdecampredon https://github.com/fdecampredon/ Questions ? Relay: https://facebook.github.io/relay/ Graphql:
http://graphql.org/