SlideShare a Scribd company logo
1 of 24
GRAPHQL
A Missing link in REST
Anubolu Sreekanth
@Tataatsu Idealabs
https://github.com/sreekanth-anubolu
What is GraphQL?
■ A query language for API
■ Ask for what you need, get exactly that
Misconceptions about GraphQL
■ GraphQL is not a Graph DB technology
■ GraphQL is not replacement of REST
■ It is not tied to any framework / language
■ Security – Authentication approach is same as
REST
Existing issues in REST?
First of all REST is great 
Issues and Gaps
■ Endless Endpoints (3500 APIs onTwitter)
■ Hard to maintainVersioning
■ Frontend Developers always find it hard
■ Multiple Roundtrips
■ Over fetching Data
■ Not agile enough
TypicalWeb Architecture
Lets try to build API for simple News Feed UI
Roundtrips are too many
Solution: Build new API that is specific to this
view.
SolvedTADAAAA
But, this API is tightly coupled to the UI
Now – Designer says lets not show tags, instead author IMG
We May Not:
• Mobile Apps are already consuming API
• So, for the new UI, we end-up over fetching data
in order to support backtracking. - Not a good
approach.
• Build new version API
UI will be changed. Should we modify
the API?
Wouldn’t it be nice if we get what we
request?
Too Many UI iterations… Developers
look at Designers…
So, REST is not greatly adoptable for
rapid development.
Building new APIs for every change
involves effort and also increases
maintenance.
Very soon API maintenance becomes
complex.
Developer Friendliness
■ Its hard for new developers to understand the evolved
API.
■ We have to maintain documentation, for everyAPI we
build. Ex: Swagger
■ Effort Involved to document.
■ Frontend developers should always wait for Backend
to complete and it slows down the development
speed.
So it’s clear that these are the common
issues on REST
■ Endless Endpoints
■ Hard to maintainVersioning
■ Multiple Roundtrips
■ Over fetching Data
■ Not agile enough
■ Frontend Developers always find it hard
Well… GraphQL will address all of that.
GraphQL – A Missing Link in REST
GraphQL – A Query Language for API
■ GraphQL is a data query language open-sourced by Facebook
in 2015, internalized in Facebook back in 2012.
■ Today all Facebook mobile devices/clients are powered by
GraphQL.
■ GraphQL is built by keeping single endpoint in mind.
■ It follows a strict schematic and type system approach.
■ Queries should be written considering the Schema andTypes
How it works?
It is a beautiful query language, which lets us query for what we want and
response is ordered in same structure as we queried.
Example of Schema
Query Response
GraphQL doesn't stop us from talking to other services
Important Features and Batteries of GraphQL
■ Dataloader – Server side caching and Batch Query Processing
■ Subscribing to Server Side Events
■ GraphiQL – Browser based IDE for writing queries
■ Built-in documentation support with GraphiQL
■ Great support to many languages
■ Apollo for Angular/React – Great Performance
■ Support for Android/IOS
GraphQL In Action
https://github.com/sreekanth-anubolu/graphql-node-sqlite
Benefits of using GraphQL
■ Single Endpoint
■ Reduced Roundtrips – Faster than before
■ Can Batch Multiple Queries
■ No Over/Under fetching, get what you want
■ Freedom to front-end developers
■ Version free
■ Productive
■ Backward compatibility
■ Results Structured as Queried
GraphQL is platform agnostic
■ JavaScript/node-js (express-graphql for backend andApollo GraphQL for client apps
likeAngular/React/Vue/Polymer.. etc.)
■ Java
■ Python
■ C#/.NET
■ PHP
■ GO
■ Erlang
■ Groovy
■ Ruby
■ Scala
Who embraced the power of GraphQL?
Thanks
Questions?
Email - anubolusreekanth@gmail.com
Demo link - https://github.com/sreekanth-anubolu/graphql-node-sqlite

More Related Content

What's hot

What's hot (20)

Graphql
GraphqlGraphql
Graphql
 
Python Map Reduce vs Scalding
Python Map Reduce vs ScaldingPython Map Reduce vs Scalding
Python Map Reduce vs Scalding
 
Web Applications of the Future with TypeScript and GraphQL
Web Applications of the Future with TypeScript and GraphQLWeb Applications of the Future with TypeScript and GraphQL
Web Applications of the Future with TypeScript and GraphQL
 
NPA Data Science: tools review
NPA Data Science: tools reviewNPA Data Science: tools review
NPA Data Science: tools review
 
GraphQL Without a Database | Frontend Developer Love
GraphQL Without a Database | Frontend Developer LoveGraphQL Without a Database | Frontend Developer Love
GraphQL Without a Database | Frontend Developer Love
 
The 4W's of Angular
The 4W's of AngularThe 4W's of Angular
The 4W's of Angular
 
Evolution of enterprise architectures
Evolution of enterprise architectures Evolution of enterprise architectures
Evolution of enterprise architectures
 
Google Charts for native Android apps
Google Charts for native Android appsGoogle Charts for native Android apps
Google Charts for native Android apps
 
OutSystems Tricks & Tips for Complex UI Integrations
OutSystems Tricks & Tips for Complex UI IntegrationsOutSystems Tricks & Tips for Complex UI Integrations
OutSystems Tricks & Tips for Complex UI Integrations
 
Android maven Road to flutter| Mavenizing Flutter for web
Android maven Road to flutter| Mavenizing Flutter for webAndroid maven Road to flutter| Mavenizing Flutter for web
Android maven Road to flutter| Mavenizing Flutter for web
 
Scala from the Trenches - Java One 2016
Scala from the Trenches - Java One 2016Scala from the Trenches - Java One 2016
Scala from the Trenches - Java One 2016
 
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinarThe case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
 
Learning Together: Motion Infographics
Learning Together: Motion InfographicsLearning Together: Motion Infographics
Learning Together: Motion Infographics
 
First programming language to learn | Which Programming Language to Learn Fi...
First programming language to learn |  Which Programming Language to Learn Fi...First programming language to learn |  Which Programming Language to Learn Fi...
First programming language to learn | Which Programming Language to Learn Fi...
 
Help with Matlab Assignment Research Help
Help with Matlab Assignment Research HelpHelp with Matlab Assignment Research Help
Help with Matlab Assignment Research Help
 
Performance optimisation with GraphQL
Performance optimisation with GraphQLPerformance optimisation with GraphQL
Performance optimisation with GraphQL
 
TuleapCon 2017-STMicroelectronics-Case-Study
TuleapCon 2017-STMicroelectronics-Case-StudyTuleapCon 2017-STMicroelectronics-Case-Study
TuleapCon 2017-STMicroelectronics-Case-Study
 
Matlab Assignment Experts Research Help
Matlab Assignment Experts Research HelpMatlab Assignment Experts Research Help
Matlab Assignment Experts Research Help
 
AWTW - Automated Web Translation Workflow
AWTW - Automated Web Translation WorkflowAWTW - Automated Web Translation Workflow
AWTW - Automated Web Translation Workflow
 
Krunalkumar rajdip
Krunalkumar rajdipKrunalkumar rajdip
Krunalkumar rajdip
 

Similar to GraphQL - Missing Link In REST

The Apollo and GraphQL Stack
The Apollo and GraphQL StackThe Apollo and GraphQL Stack
The Apollo and GraphQL Stack
Sashko Stubailo
 

Similar to GraphQL - Missing Link In REST (20)

GraphQL.net
GraphQL.netGraphQL.net
GraphQL.net
 
apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...
apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...
apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...
 
GraphQL over REST at Reactathon 2018
GraphQL over REST at Reactathon 2018GraphQL over REST at Reactathon 2018
GraphQL over REST at Reactathon 2018
 
Modular GraphQL with Schema Stitching
Modular GraphQL with Schema StitchingModular GraphQL with Schema Stitching
Modular GraphQL with Schema Stitching
 
React Flux to GraphQL
React Flux to GraphQLReact Flux to GraphQL
React Flux to GraphQL
 
GraphQL-ify your APIs - Devoxx UK 2021
 GraphQL-ify your APIs - Devoxx UK 2021 GraphQL-ify your APIs - Devoxx UK 2021
GraphQL-ify your APIs - Devoxx UK 2021
 
Sashko Stubailo - The GraphQL and Apollo Stack: connecting everything together
Sashko Stubailo - The GraphQL and Apollo Stack: connecting everything togetherSashko Stubailo - The GraphQL and Apollo Stack: connecting everything together
Sashko Stubailo - The GraphQL and Apollo Stack: connecting everything together
 
The Apollo and GraphQL Stack
The Apollo and GraphQL StackThe Apollo and GraphQL Stack
The Apollo and GraphQL Stack
 
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
 
Marco Liberati - Graph analytics
Marco Liberati - Graph analyticsMarco Liberati - Graph analytics
Marco Liberati - Graph analytics
 
GraphQL ♥︎ GraphDB
GraphQL ♥︎ GraphDBGraphQL ♥︎ GraphDB
GraphQL ♥︎ GraphDB
 
Create GraphQL server with apolloJS
Create GraphQL server with apolloJSCreate GraphQL server with apolloJS
Create GraphQL server with apolloJS
 
GraphQL for Native Apps
GraphQL for Native AppsGraphQL for Native Apps
GraphQL for Native Apps
 
GraphQL API Crafts presentation
GraphQL API Crafts presentationGraphQL API Crafts presentation
GraphQL API Crafts presentation
 
Graphql presentation
Graphql presentationGraphql presentation
Graphql presentation
 
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
 
Harnessing the Power of GraphQL in WordPress
Harnessing the Power of GraphQL in WordPressHarnessing the Power of GraphQL in WordPress
Harnessing the Power of GraphQL in WordPress
 
Social Network
Social NetworkSocial Network
Social Network
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Elixir + GraphQL = Absinthe 2019.04.10
Elixir + GraphQL = Absinthe 2019.04.10Elixir + GraphQL = Absinthe 2019.04.10
Elixir + GraphQL = Absinthe 2019.04.10
 

Recently uploaded

Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 

Recently uploaded (20)

Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 

GraphQL - Missing Link In REST

  • 1. GRAPHQL A Missing link in REST Anubolu Sreekanth @Tataatsu Idealabs https://github.com/sreekanth-anubolu
  • 2. What is GraphQL? ■ A query language for API ■ Ask for what you need, get exactly that
  • 3. Misconceptions about GraphQL ■ GraphQL is not a Graph DB technology ■ GraphQL is not replacement of REST ■ It is not tied to any framework / language ■ Security – Authentication approach is same as REST
  • 4. Existing issues in REST? First of all REST is great  Issues and Gaps ■ Endless Endpoints (3500 APIs onTwitter) ■ Hard to maintainVersioning ■ Frontend Developers always find it hard ■ Multiple Roundtrips ■ Over fetching Data ■ Not agile enough
  • 6. Lets try to build API for simple News Feed UI Roundtrips are too many
  • 7. Solution: Build new API that is specific to this view. SolvedTADAAAA But, this API is tightly coupled to the UI
  • 8. Now – Designer says lets not show tags, instead author IMG We May Not: • Mobile Apps are already consuming API • So, for the new UI, we end-up over fetching data in order to support backtracking. - Not a good approach. • Build new version API UI will be changed. Should we modify the API? Wouldn’t it be nice if we get what we request?
  • 9. Too Many UI iterations… Developers look at Designers…
  • 10. So, REST is not greatly adoptable for rapid development. Building new APIs for every change involves effort and also increases maintenance. Very soon API maintenance becomes complex.
  • 11. Developer Friendliness ■ Its hard for new developers to understand the evolved API. ■ We have to maintain documentation, for everyAPI we build. Ex: Swagger ■ Effort Involved to document. ■ Frontend developers should always wait for Backend to complete and it slows down the development speed.
  • 12. So it’s clear that these are the common issues on REST ■ Endless Endpoints ■ Hard to maintainVersioning ■ Multiple Roundtrips ■ Over fetching Data ■ Not agile enough ■ Frontend Developers always find it hard
  • 13. Well… GraphQL will address all of that. GraphQL – A Missing Link in REST
  • 14. GraphQL – A Query Language for API ■ GraphQL is a data query language open-sourced by Facebook in 2015, internalized in Facebook back in 2012. ■ Today all Facebook mobile devices/clients are powered by GraphQL. ■ GraphQL is built by keeping single endpoint in mind. ■ It follows a strict schematic and type system approach. ■ Queries should be written considering the Schema andTypes
  • 15. How it works? It is a beautiful query language, which lets us query for what we want and response is ordered in same structure as we queried.
  • 18. GraphQL doesn't stop us from talking to other services
  • 19. Important Features and Batteries of GraphQL ■ Dataloader – Server side caching and Batch Query Processing ■ Subscribing to Server Side Events ■ GraphiQL – Browser based IDE for writing queries ■ Built-in documentation support with GraphiQL ■ Great support to many languages ■ Apollo for Angular/React – Great Performance ■ Support for Android/IOS
  • 21. Benefits of using GraphQL ■ Single Endpoint ■ Reduced Roundtrips – Faster than before ■ Can Batch Multiple Queries ■ No Over/Under fetching, get what you want ■ Freedom to front-end developers ■ Version free ■ Productive ■ Backward compatibility ■ Results Structured as Queried
  • 22. GraphQL is platform agnostic ■ JavaScript/node-js (express-graphql for backend andApollo GraphQL for client apps likeAngular/React/Vue/Polymer.. etc.) ■ Java ■ Python ■ C#/.NET ■ PHP ■ GO ■ Erlang ■ Groovy ■ Ruby ■ Scala
  • 23. Who embraced the power of GraphQL?
  • 24. Thanks Questions? Email - anubolusreekanth@gmail.com Demo link - https://github.com/sreekanth-anubolu/graphql-node-sqlite