SlideShare a Scribd company logo
The Evolution of API Design
API
History
New API Standard
GraphQL over REST
GraphQL Fundamentals
Application
Application Database
Application DatabaseServer
rogramming
pplication
nterface
Socket Programming
Socket
Remote Procedure Call
XML-RPC
XML-RPC
Remote Procedure Call
Remote Procedure Call
XML-RPC
Simple Object Access Protocol
SOAP
SOAP-ENV : Envelope
SOAP-ENV: Header
SOAP-ENV: Body
Simple Object Access Protocol
SOAP
REpresentational State Transfer
REST
REST
• Need for efficient data loading
• Need for efficient data loading
• Variety of different frontend platforms
• Need for efficient data loading
• Variety of different frontend platforms
• Fast & Iterative development
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
With GraphQL,
you model your business domain as a graph
GraphQL over REST
A Query Language for your APIQuery Language


• New API Standard invented by Facebook
• New API Standard invented by Facebook
• Presented publicly at React.js Conf 2015
• New API Standard invented by Facebook
• Presented publicly at React.js Conf 2015
• Declarative Data Fetching
GraphQL over REST
• New API Standard invented by Facebook
• Presented publicly at React.js Conf 2015
• Declarative Data Fetching
• Single Endpoint, Single Request
GraphQL over REST
• New API Standard invented by Facebook
• Presented publicly at React.js Conf 2015
• Declarative Data Fetching
• Single Endpoint, Single Request
• Strong Type System
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
Open Source License
BSD + Patents
Open Source License
BSD + Patents
Open Source License
BSD + Patents
Open Source License
OWFa v1.0
GraphQL over REST
https://developer.github.com/v3/
https://developer.github.com/v4/
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
User Name
User Name
Post Title
User Name
Post Title
Follower Name
/users/<id>
/users/<id>/posts
/users/<id>/followers
/users/<id>
/users/<id>/posts
/users/<id>/followers
Fetch user data
/users/<id>
/users/<id>/posts
/users/<id>/followers
Fetch user data
/users/<id>
/users/<id>/posts
/users/<id>/followers
Fetch posts
/users/<id>
/users/<id>/posts
/users/<id>/followers
Fetch posts
/users/<id>
/users/<id>/posts
/users/<id>/followers
Fetch followers
/users/<id>
/users/<id>/posts
/users/<id>/followers
Fetch followers
/graphql
/graphql
Fetch everything with a single request
/graphql
Fetch everything with a single request
• Underfetching (N + 1 requests problem)
/users/<id>
/users/<id>/posts
/users/<id>/followers
/users/<id>
/users/<id>/posts
/users/<id>/followers
/users/<id>
/users/<id>/posts
/users/<id>/followers
/graphql
• Underfetching (N + 1 requests problem)
• Nested CompletionHandler
• Underfetching (N + 1 requests problem)
• Nested CompletionHandler
• Underfetching (N + 1 requests problem)
• Nested CompletionHandler
• Overfetching
.
.
.
.
.
.
.
.
.
• Underfetching (N + 1 requests problem)
• Nested CompletionHandler
• Overfetching
• Too Many Endpoints
Clients
/users
/usersInfo
/usersCount
/userPosts
/users
/usersInfo
/usersCount
/userPosts
/userFollowers
Clients
/userByPost
/userNameStartsK
• Underfetching (N + 1 requests problem)
• Nested CompletionHandler
• Overfetching
• Too Many Endpoints
• Versioning
GraphQL over REST
GraphQL over REST
GraphQL over REST
• Underfetching (N + 1 requests problem)
• Nested CompletionHandler
• Overfetching
• Too Many Endpoints
• Versioning
• Schemaless
GraphQL over REST
• Underfetching (N + 1 requests problem)
• Nested CompletionHandler
• Overfetching
• Too Many Endpoints
• Versioning
• Schemaless
• Slow Product Development
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
User Requests (per hour)
Authenticated 5000
Unauthenticated 60
User Requests (per hour)
Authenticated 5000
Unauthenticated 60
User Requests (per hour)
Authenticated 5000
Unauthenticated 60
• Node Limit

Individual Call ≦ 500,000 total nodes
GraphQL over REST
GraphQL over REST
GraphQL over REST
• Node Limit
• Rate Limit

5,000 points per hour (points ≠ call)
GraphQL over REST
1
1
100
1
100
5000
1
100
5000
5101
1
100
5000
5101 / 100
= 51
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
GraphQL over REST
Server
Server
Server
Connection
Server
Connection
Server
Connection
GraphQL over REST
GraphQL over REST
Architectural Style
HTTP, HTTPS Protocol
Multiple Endpoints
Schemaless
Fixed Data Structure
Versioning
Standard API
Transport Layer Agnostic
Single Endpoint
Strongly Typed Schema
Flexible Data Structure
Evolve API Without Versions
GraphQL over REST
GraphQL over REST

More Related Content

PDF
Letswift18 키노트
Jung Kim
 
PDF
GlueCon 2015 - Publish your SQL data as web APIs
Restlet
 
PPTX
Tear It Down, Build It Back Up: Empowering Developers with Amazon CloudFormation
James Andrew Vaughn
 
PDF
eazyBI Overview - Embedding Mondrian in other applications
Raimonds Simanovskis
 
PDF
Railsで作るBFFの功罪
Recruit Lifestyle Co., Ltd.
 
PPTX
Git and Ruby on Rails
Jagdish Barabari
 
PPTX
No sql and mongodb
Ömer Taşkın
 
PDF
GraphQL in Ruby on Rails - basics
Visuality
 
Letswift18 키노트
Jung Kim
 
GlueCon 2015 - Publish your SQL data as web APIs
Restlet
 
Tear It Down, Build It Back Up: Empowering Developers with Amazon CloudFormation
James Andrew Vaughn
 
eazyBI Overview - Embedding Mondrian in other applications
Raimonds Simanovskis
 
Railsで作るBFFの功罪
Recruit Lifestyle Co., Ltd.
 
Git and Ruby on Rails
Jagdish Barabari
 
No sql and mongodb
Ömer Taşkın
 
GraphQL in Ruby on Rails - basics
Visuality
 

What's hot (20)

PPTX
AWS for the Java Developer
Rory Preddy
 
PDF
GraphQL as a REST API alternative
Kamil Rykowski
 
PPTX
Vs java (1)
Rory Preddy
 
PDF
RubyConf China 2015 - Rails off assets pipeline
Florian Dutey
 
PDF
AWS Lambda Function with Kotlin
Troy Miles
 
PPTX
Hands on Gradle
Mushfekur Rahman
 
PPTX
React Component in scala.js
Unfold UI
 
PDF
Asp.Net 3.5 Part 2
asim78
 
PDF
Apache Jackrabbit
elliando dias
 
PDF
RubyConf Taiwan 2016 - Large scale Rails applications
Florian Dutey
 
PPTX
Rust meetup delhi nov 18
Abhiram Ravikumar
 
PPTX
Webservices: The RESTful Approach
Mushfekur Rahman
 
PDF
Javantura v4 - Angular2 - Ionic2 - from birth to stable versions - Hrvoje Pek...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PPTX
Spark Summit - Mobius C# Binding for Apache Spark
shareddatamsft
 
PPTX
Gr8conf - Griffon Update
Andres Almiray
 
PDF
ソーシャルゲームの課金認証共通基盤をどう設計したか
Yugo Shimizu
 
PDF
The Holy Grail of continuous delivery in distributed teams environment
Szymon Kurcab
 
PDF
Scala ecosystem - Dublin Scala Meetup, Oct 2018
Mikhail Girkin
 
PDF
C# 8 in Libraries and Applications
Christian Nagel
 
PDF
Avoiding GraphQL insecurities with OWASP SKF - OWASP HU meetup
Davide Cioccia
 
AWS for the Java Developer
Rory Preddy
 
GraphQL as a REST API alternative
Kamil Rykowski
 
Vs java (1)
Rory Preddy
 
RubyConf China 2015 - Rails off assets pipeline
Florian Dutey
 
AWS Lambda Function with Kotlin
Troy Miles
 
Hands on Gradle
Mushfekur Rahman
 
React Component in scala.js
Unfold UI
 
Asp.Net 3.5 Part 2
asim78
 
Apache Jackrabbit
elliando dias
 
RubyConf Taiwan 2016 - Large scale Rails applications
Florian Dutey
 
Rust meetup delhi nov 18
Abhiram Ravikumar
 
Webservices: The RESTful Approach
Mushfekur Rahman
 
Javantura v4 - Angular2 - Ionic2 - from birth to stable versions - Hrvoje Pek...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Spark Summit - Mobius C# Binding for Apache Spark
shareddatamsft
 
Gr8conf - Griffon Update
Andres Almiray
 
ソーシャルゲームの課金認証共通基盤をどう設計したか
Yugo Shimizu
 
The Holy Grail of continuous delivery in distributed teams environment
Szymon Kurcab
 
Scala ecosystem - Dublin Scala Meetup, Oct 2018
Mikhail Girkin
 
C# 8 in Libraries and Applications
Christian Nagel
 
Avoiding GraphQL insecurities with OWASP SKF - OWASP HU meetup
Davide Cioccia
 
Ad

Similar to GraphQL over REST (20)

PDF
API Management for GraphQL
WSO2
 
PDF
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
Hafiz Ismail
 
PDF
GraphQL Bangkok meetup 5.0
Tobias Meixner
 
PDF
Graphql
Niv Ben David
 
PDF
apidays LIVE Paris - GraphQL meshes by Jens Neuse
apidays
 
PDF
Building and deploying GraphQL Servers with AWS Lambda and Prisma I AWS Dev D...
AWS Germany
 
PPTX
Taking Control of your Data with GraphQL
Vinci Rufus
 
PDF
Are you ready to adopt GraphQL?
Siva Prasad Rao Janapati
 
PDF
API Management for GraphQL
WSO2
 
PDF
Testing and Developing GraphQL APIs
Postman
 
PDF
GraphQL - A love story
bwullems
 
PDF
Frontcon Riga - GraphQL Will Do To REST What JSON Did To XML
Roy Derks
 
PDF
GraphQL in an Age of REST
Yos Riady
 
PDF
GraphQL: The Missing Link Between Frontend and Backend Devs
Sashko Stubailo
 
PPTX
Introduction to Graph QL
Deepak More
 
PPTX
The API Journey: from REST to GraphQL
Haci Murat Yaman
 
PDF
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2
 
PPTX
apidays Munich 2025 - GraphQL 101: I won't REST, until you GraphQL, Surbhi Si...
apidays
 
PDF
Rate Limiting GQLs Using Depth and Complexity Analysis
WSO2
 
PDF
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...
apidays
 
API Management for GraphQL
WSO2
 
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
Hafiz Ismail
 
GraphQL Bangkok meetup 5.0
Tobias Meixner
 
Graphql
Niv Ben David
 
apidays LIVE Paris - GraphQL meshes by Jens Neuse
apidays
 
Building and deploying GraphQL Servers with AWS Lambda and Prisma I AWS Dev D...
AWS Germany
 
Taking Control of your Data with GraphQL
Vinci Rufus
 
Are you ready to adopt GraphQL?
Siva Prasad Rao Janapati
 
API Management for GraphQL
WSO2
 
Testing and Developing GraphQL APIs
Postman
 
GraphQL - A love story
bwullems
 
Frontcon Riga - GraphQL Will Do To REST What JSON Did To XML
Roy Derks
 
GraphQL in an Age of REST
Yos Riady
 
GraphQL: The Missing Link Between Frontend and Backend Devs
Sashko Stubailo
 
Introduction to Graph QL
Deepak More
 
The API Journey: from REST to GraphQL
Haci Murat Yaman
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2
 
apidays Munich 2025 - GraphQL 101: I won't REST, until you GraphQL, Surbhi Si...
apidays
 
Rate Limiting GQLs Using Depth and Complexity Analysis
WSO2
 
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...
apidays
 
Ad

More from Bongwon Lee (8)

PDF
DeprecatedAPI로 알아보는 SwiftUI
Bongwon Lee
 
PDF
Swift in SwiftUI
Bongwon Lee
 
PDF
App Lifecycle
Bongwon Lee
 
PDF
The Sandbox Container Directory
Bongwon Lee
 
PDF
Simulator customizing & testing for Xcode 9
Bongwon Lee
 
PDF
LetSwift 2017 - ARKit
Bongwon Lee
 
PDF
Realm, Mobile Database
Bongwon Lee
 
PDF
Custom Xcode Template (with VIPER)
Bongwon Lee
 
DeprecatedAPI로 알아보는 SwiftUI
Bongwon Lee
 
Swift in SwiftUI
Bongwon Lee
 
App Lifecycle
Bongwon Lee
 
The Sandbox Container Directory
Bongwon Lee
 
Simulator customizing & testing for Xcode 9
Bongwon Lee
 
LetSwift 2017 - ARKit
Bongwon Lee
 
Realm, Mobile Database
Bongwon Lee
 
Custom Xcode Template (with VIPER)
Bongwon Lee
 

GraphQL over REST