SlideShare a Scribd company logo
GraphQL vs
Traditional REST API
Vladimir Dejanović
Prague, 18-19 October 2018
@VladimirD_42
Vladimir Dejanović
Let’s Meet
@VladimirD_42
vladimir@itshark.xyz
http://itshark.xyz
@VladimirD_42
Vladimir Dejanović
Let’s Meet
http://itshark.xyz
@VladimirD_42
Vladimir Dejanović
Let’s Meet
@VladimirD_42
Vladimir Dejanović
Let’s Meet
and Others...
@VladimirD_42@geecon
Agenda
@VladimirD_42@geecon
Agenda
REST
@VladimirD_42@geecon
Agenda
REST
GraphQL
@VladimirD_42@geecon
Agenda
REST
GraphQL
GraphQL vs REST
@VladimirD_42@geecon
Agenda
REST
GraphQL
GraphQL vs REST
Questions
@VladimirD_42@geecon
What is REST?
@VladimirD_42@geecon
REST
http://www.ics.uci.edu/~fielding/pubs/
dissertation/rest_arch_style.htm
@VladimirD_42@geecon
REST
Client-Server Architecture
@VladimirD_42@geecon
REST
Statelessness
Client-Server Architecture
@VladimirD_42@geecon
REST
Statelessness
Cacheability
Client-Server Architecture
@VladimirD_42@geecon
REST
Statelessness
Cacheability
Layered System
Client-Server Architecture
@VladimirD_42@geecon
REST
Statelessness
Cacheability
Layered System
Client-Server Architecture
Code on Demand (Optional)
@VladimirD_42@geecon
REST
Statelessness
Cacheability
Layered System
Uniform Interface
Client-Server Architecture
Code on Demand (Optional)
@VladimirD_42@geecon
REST in real life
@VladimirD_42@geecon
REST in real life
@VladimirD_42@geecon
REST in real life
@VladimirD_42@geecon
REST in real life
@VladimirD_42@geecon
Simple Blog
@VladimirD_42@geecon
Simple Blog
Author
id
name
@VladimirD_42@geecon
Simple Blog
Author
id
name
Post
id
title
body
authorId
@VladimirD_42@geecon
Simple Blog
Author
id
name
Post
id
title
body
authorId
Comment
id
text
postId
authorId
@VladimirD_42@geecon
Simple Blog
https://github.com/vladimir-dejanovic/graphql-
vs-traditional-rest-api-conftalk_demo
Branch: rest-0.1
@VladimirD_42@geecon
What is GraphQL?
@VladimirD_42@geecon
GraphQL
GraphQL is a query language
for APIs
@VladimirD_42@geecon
GraphQL
is
specification
@VladimirD_42@geecon
GraphQL
graphql-java
@VladimirD_42@geecon
GraphQL
Talking is boring
Show Code
@VladimirD_42@geecon
Simple Blog GraphQL Code
https://github.com/vladimir-dejanovic/graphql-
vs-traditional-rest-api-conftalk_demo
Branch: graphql-0.1
@VladimirD_42@geecon
GraphQL
Statelessness
Cacheability
Layered System
Uniform Interface
Client-Server Architecture
Code on Demand (Optional)
@VladimirD_42@geecon
GraphQL
Statelessness
Cacheability
Layered System
Uniform Interface
Client-Server Architecture
Code on Demand (Optional)
@VladimirD_42@geecon
GraphQL
Statelessness
Cacheability
Layered System
Uniform Interface
Client-Server Architecture
Code on Demand (Optional)
@VladimirD_42@geecon
GraphQL
Statelessness
Cacheability
Layered System
Uniform Interface
Client-Server Architecture
Code on Demand (Optional)
@VladimirD_42@geecon
GraphQL
Statelessness
Cacheability
Layered System
Uniform Interface
Client-Server Architecture
Code on Demand (Optional)
@VladimirD_42@geecon
GraphQL
Statelessness
Cacheability
Layered System
Uniform Interface
Client-Server Architecture
Code on Demand (Optional)
@VladimirD_42@geecon
GraphQL
Statelessness
Cacheability
Layered System
Uniform Interface
Client-Server Architecture
Code on Demand (Optional)
@VladimirD_42@geecon
REST
Schema Optional
@VladimirD_42@geecon
REST
Schema Optional
Good practice, but still optional
@VladimirD_42@geecon
GraphQL
Schema is MANDATORY
@VladimirD_42@geecon
GraphQL
@VladimirD_42@geecon
GraphQL
@VladimirD_42@geecon
GraphQL
@VladimirD_42@geecon
GraphQL
@VladimirD_42@geecon
GraphQL
@VladimirD_42@geecon
GraphQL
@VladimirD_42@geecon
REST
@VladimirD_42@geecon
Simple Blog GraphQL Code
https://github.com/vladimir-dejanovic/graphql-
vs-traditional-rest-api-conftalk_demo
Branch: graphql-0.2
@VladimirD_42@geecon
GraphQL
Post
Comment
Author
@VladimirD_42@geecon
GraphQL
Post
Comment
Author
@VladimirD_42@geecon
GraphQL
Post
Comment
Author
@VladimirD_42@geecon
GraphQL
Post
Comment
Author
@VladimirD_42@geecon
GraphQL
Post
Comment
Author
@VladimirD_42@geecon
GraphQL
Post
Comment
Author
@VladimirD_42@geecon
Simple Blog GraphQL Code
https://github.com/vladimir-dejanovic/graphql-
vs-traditional-rest-api-conftalk_demo
Branch: graphql-0.3
@VladimirD_42@geecon
GraphQL
GraphQL is a query language
for APIs
@VladimirD_42@geecon
GraphQL
API
@VladimirD_42@geecon
GraphQL
Powerful Query Language
@VladimirD_42@geecon
GraphQL
Client call the shots
@VladimirD_42@geecon
GraphQL
Post
Comment
Author
@VladimirD_42@geecon
GraphQL
Post
Comment
Author
@VladimirD_42@geecon
Abuse of GraphQL
query {
allPosts {
title
comments {
text
createdBy {
name
posts {
title
comments {
text
@VladimirD_42@geecon
Abuse of GraphQL
query {
allPosts {
title
comments {
text
createdBy {
name
posts {
title
comments {
text
@VladimirD_42@geecon
Protect from Abuse
@VladimirD_42@geecon
Protect from Abuse
Time Out
@VladimirD_42@geecon
Protect from Abuse
Time Out
Max Query Depth
@VladimirD_42@geecon
Protect from Abuse
Time Out
Max Query Depth
Max Query Complexity
@VladimirD_42@geecon
Protect from Abuse
Time Out
Max Query Depth
Max Query Complexity
Throttling
@VladimirD_42@geecon
GraphQL query language for API
@VladimirD_42@geecon
GraphQL query language for API
Query
@VladimirD_42@geecon
GraphQL query language for API
Query
Mutation
@VladimirD_42@geecon
Simple Blog GraphQL Code
https://github.com/vladimir-dejanovic/graphql-
vs-traditional-rest-api-conftalk_demo
Branch: graphql-0.4
@VladimirD_42@geecon
GraphQL query language for API
Query
Mutation
Subscription
@VladimirD_42@geecon
GraphQL questions to ask
@VladimirD_42@geecon
GraphQL questions to ask
Error Responses
@VladimirD_42@geecon
GraphQL questions to ask
Error Responses
Performance & Cache
@VladimirD_42@geecon
GraphQL questions to ask
Error Responses
Performance & Cache
Authentication & Authorisation
@VladimirD_42@geecon
GraphQL
Vs
Traditional REST API
@VladimirD_42@geecon
GraphQL vs Traditional REST API
“Similar”
@VladimirD_42@geecon
GraphQL vs Traditional REST API
“Similar”
Tools & Knowledge
@VladimirD_42@geecon
GraphQL vs Traditional REST API
“Similar”
Tools & Knowledge
“Old Tricks”
@VladimirD_42@geecon
GraphQL vs Traditional REST API
GraphQL rich SDL
@VladimirD_42@geecon
GraphQL vs Traditional REST API
GraphQL rich SDL
GraphQL powerful Query Language
@VladimirD_42@geecon
Thank You
@VladimirD_42@geecon
References
https://github.com/vladimir-dejanovic/graphql-
vs-traditional-rest-api-conftalk_demo
http://www.ics.uci.edu/~fielding/pubs/dissertat
ion/rest_arch_style.htm
@VladimirD_42
Questions
@VladimirD_42
vladimir@itshark.xyz
http://itshark.xyz
@geecon

More Related Content

PDF
GeeCON 2018 GraphQL vs Traditional REST API
PDF
Java Day Istanbul 2018 GraphQL vs Traditional REST API
PDF
Devoxx France 2018 GraphQL vs Traditional REST API
PDF
Graphql
PDF
GraphQL Search
PDF
GraphQL Fundamentals
PDF
Intro to GraphQL
PDF
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...
GeeCON 2018 GraphQL vs Traditional REST API
Java Day Istanbul 2018 GraphQL vs Traditional REST API
Devoxx France 2018 GraphQL vs Traditional REST API
Graphql
GraphQL Search
GraphQL Fundamentals
Intro to GraphQL
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...

What's hot (19)

PPTX
Introduction to GraphQL
PDF
GraphQL and its schema as a universal layer for database access
PDF
REST vs GraphQL
PDF
GraphQL London January 2018: Graphql tooling
PDF
Kafka and GraphQL: Misconceptions and Connections | Gerard Klijs, Open Web
PPTX
Introduction to GraphQL
PPTX
GraphQL Introduction
PDF
The 7 Deadly Sins of API Design
PPTX
An intro to GraphQL
PDF
Building materialised views for linked data systems using microservices
PDF
How to GraphQL
PDF
GraphQL in an Age of REST
PDF
From programming languages to network protocols: lessons on API design
PPT
Graphql presentation
PPTX
GraphQL Introduction
PDF
Modular GraphQL with Schema Stitching
PDF
DEVOXX UK 2018 - GraphQL as an alternative approach to REST
PDF
GraphQL: The Missing Link Between Frontend and Backend Devs
PDF
GraphQL: Enabling a new generation of API developer tools
Introduction to GraphQL
GraphQL and its schema as a universal layer for database access
REST vs GraphQL
GraphQL London January 2018: Graphql tooling
Kafka and GraphQL: Misconceptions and Connections | Gerard Klijs, Open Web
Introduction to GraphQL
GraphQL Introduction
The 7 Deadly Sins of API Design
An intro to GraphQL
Building materialised views for linked data systems using microservices
How to GraphQL
GraphQL in an Age of REST
From programming languages to network protocols: lessons on API design
Graphql presentation
GraphQL Introduction
Modular GraphQL with Schema Stitching
DEVOXX UK 2018 - GraphQL as an alternative approach to REST
GraphQL: The Missing Link Between Frontend and Backend Devs
GraphQL: Enabling a new generation of API developer tools
Ad

Similar to GraphQL vs Traditional Rest API [GeeCon Prague 2018] (16)

PDF
What limitations & problems of REST API can be solved with GraphQL [jPrime 2019]
PDF
GraphQL in Java World [Workshop RivieraDev 2019]
PDF
GraphQL vs Traditional Rest API
PDF
REST API vs gRPC, which one should you use in breaking a monolith [Dev conf 2...
PDF
Voxxed Days Belgrade - Changing wheels on moving car, from monolith to micros...
PPTX
Xamarin + GraphQL
PDF
Micronaut, Dragon-Slayer (Spring/boot) or just another framework [GeeCON Krak...
PDF
REST API vs gRPC, which one should you use in breaking a monolith [Kdg.net 2018]
PPTX
Building GraphQL APIs in C#
PPTX
Building GraphQL API in C#.pptx
PDF
A tech writer, a map, and an app
PDF
Changing wheels on moving car, from monolith to microservices by using api's V2
PDF
Multiplatform development with Kotlin
PDF
GraphQL - when REST API is to less - lessons learned
PDF
Implement Web API with Swagger
PDF
apidays LIVE Australia 2020 - From micro to macro-coordination through domain...
What limitations & problems of REST API can be solved with GraphQL [jPrime 2019]
GraphQL in Java World [Workshop RivieraDev 2019]
GraphQL vs Traditional Rest API
REST API vs gRPC, which one should you use in breaking a monolith [Dev conf 2...
Voxxed Days Belgrade - Changing wheels on moving car, from monolith to micros...
Xamarin + GraphQL
Micronaut, Dragon-Slayer (Spring/boot) or just another framework [GeeCON Krak...
REST API vs gRPC, which one should you use in breaking a monolith [Kdg.net 2018]
Building GraphQL APIs in C#
Building GraphQL API in C#.pptx
A tech writer, a map, and an app
Changing wheels on moving car, from monolith to microservices by using api's V2
Multiplatform development with Kotlin
GraphQL - when REST API is to less - lessons learned
Implement Web API with Swagger
apidays LIVE Australia 2020 - From micro to macro-coordination through domain...
Ad

More from Vladimir Dejanovic (10)

PDF
What Users Want, A/B testing explained [CodeteCon 2018]
PDF
Java land What Users Want, A/B testing explained
PDF
JavaLand gRPC vs REST API
PDF
Java One Secret of developing high performance website, with no budget
PDF
What users want [DevoxxPL]
PDF
Secret of developing high performance website, with no budget in small amount...
PDF
Changing wheels on moving car, from monolith to microservices by using api's
PDF
Pain of growing up, and moving to large scale
PDF
Protocol buffers and Microservices
ODP
What users want
What Users Want, A/B testing explained [CodeteCon 2018]
Java land What Users Want, A/B testing explained
JavaLand gRPC vs REST API
Java One Secret of developing high performance website, with no budget
What users want [DevoxxPL]
Secret of developing high performance website, with no budget in small amount...
Changing wheels on moving car, from monolith to microservices by using api's
Pain of growing up, and moving to large scale
Protocol buffers and Microservices
What users want

Recently uploaded (20)

PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
top salesforce developer skills in 2025.pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
history of c programming in notes for students .pptx
PPTX
Transform Your Business with a Software ERP System
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
ai tools demonstartion for schools and inter college
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Nekopoi APK 2025 free lastest update
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
Odoo Companies in India – Driving Business Transformation.pdf
top salesforce developer skills in 2025.pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
history of c programming in notes for students .pptx
Transform Your Business with a Software ERP System
Operating system designcfffgfgggggggvggggggggg
ai tools demonstartion for schools and inter college
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Odoo POS Development Services by CandidRoot Solutions
2025 Textile ERP Trends: SAP, Odoo & Oracle
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PTS Company Brochure 2025 (1).pdf.......
Nekopoi APK 2025 free lastest update
wealthsignaloriginal-com-DS-text-... (1).pdf
Upgrade and Innovation Strategies for SAP ERP Customers

GraphQL vs Traditional Rest API [GeeCon Prague 2018]