Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Introduction à GraphQL
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
fdecampredon
April 07, 2016
Technology
1.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
210
Going Reactive with React
fdecampredon
1
590
Introduction à ReactJS
fdecampredon
0
80
Other Decks in Technology
See All in Technology
不可逆な意思決定を避けながら10億超の顧客データを AI Ready にするデータ基盤設計
baseballyama
1
230
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
110
AI 時代の Azure エンジニアリング ~ 私たちは何を磨き、何を任せるのか ~
chack411
1
550
AI時代だからこそ推したい!Gitコマンド再入門
munakata
0
160
AIは爆速なのに、私が詰まっていた話 ― 音声入力と鳴くマスコットでボトルネックを削る
yama3133
0
560
AI駆動開発、viviONの1年 ── うまくいったこと・いかなかったこと
vivion
0
270
TinyGoでオブザーバビリティ?OpenTelemetryはTinyGoで使えるのか / Is OpenTelemetry available in TinyGo environment?
ymotongpoo
2
120
AI時代に必要な脅威モデリング― 変化の速度に負けない理解とリスク判断
masakane55
5
1.2k
生成AIで高い生産性を求められて、 悩み、乗り越えた話
mot_techtalk
2
140
生成AIと進める探索的データ分析(2026.10.03 第122回Tokyo.R勉強会)
tatamiya
2
1.4k
Kiro Crewをはじめよう
kizawa2020
1
110
Datadog の学び方 - あるいは、オブザーバビリティを学ぶとは何か
mananyuki
1
510
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
516
110k
Google's AI Overviews - The New Search
badams
0
1.6k
Six Lessons from altMBA
skipperchong
29
4.5k
KATA
mclloyd
PRO
35
16k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
840
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
450
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Abbi's Birthday
coloredviolet
4
10k
Un-Boring Meetings
codingconduct
0
450
Into the Great Unknown - MozCon
thekraken
41
2.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
620
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/