Enabling a new generation of API developer tools
GraphQL
Sashko Stubailo
@stubailo
Apollo Open Source Lead, Meteor
Browser
Web Server
C L I E N T
S E R V E R
A B R I E F H I S T O R Y O F W E B A P P S
<HTML />
Sending HTML from a web
server to a browser
JavaScript UI
API Server
C L I E N T
S E R V E R
A B R I E F H I S T O R Y O F W E B A P P S
{ data }
Sending data from an API
server to a single-page app,
for better performance
JavaScript UI
API Server
C L I E N T
S E R V E R
A B R I E F H I S T O R Y O F A P P S
{ data }
Sending data from an API
server to multiple clients in
different environments
Native iOS app
CordovaBrowser Native
Microservice Microservice Microservice
C L I E N T
S E R V E R
A B R I E F H I S T O R Y O F A P P S
Splitting into microservices,
waterfall loading and
multiple APIs
CordovaBrowser Native
Microservice Microservice Microservice
C L I E N T
S E R V E R
A B R I E F H I S T O R Y O F A P P S
Add an API gateway, now there’s
a development bottleneck
API gateway
Too many API
endpoints, one per UI
feature
API endpoints don’t
meet UI needs
Possible performance
or security issues to
ship faster
Takes too long to build
the API for a new
feature
Frontend team
develops API
Backend team
develops API
CordovaBrowser Native
Microservice Microservice Microservice
C L I E N T
S E R V E R
T H E F U T U R E O F A P P S
The solution: GraphQL as the
translation layer between
frontend and backend
GraphQL API gateway
Best of both worlds?
Let’s look at the benefits…
Flexible: “Make your own endpoints”
query Human {
human(id: "1000") {
name
height(unit: FOOT)
}
}
{
"human": {
"name": "Luke Skywalker",
"height": 5.6430448
}
}
• Choose from your API’s schema of types, fields, and arguments
• Computed fields, parameters, type conditions, and more
• Validates queries for you
Performance: Get what you need
• No need to hit multiple endpoints to
render one page
• Select only the fields that are needed
• Batch across all data requirements
• Eliminate unnecessary fetching with
fancy clients, such as Apollo and Relay
query Human {
human(id: "1000") {
name
avatar(size: SMALL)
friends {
name
}
}
}
Not just a tool: An open source spec
S E R V E R S
• Plain HTTP request
• React
• Angular
• Vue
• Polymer
• Native iOS/Android
C L I E N T S
• Node.js
• Ruby
• Python
• Scala
• Java
• Erlang
T O O L S
• API explorer (GraphiQL)
• Editor autocomplete
• Query validation
• Mocking
• Performance analysis
• Code generation
…and more
Think carefully about API needs
Hardcode special endpoints
User Interface Backend
W I T H R E S T
Ask for data
Get the data
User Interface Backend
W I T H G R A P H Q L
A better API experience
T O O L S
GraphiQL query editor
GraphQL APIs are inherently self-documenting
Static query analysis inside your code
Without running the code, find:
• Typos in fields
• Wrong arguments
• Deprecated fields
• Identify field usage
apollostack/eslint-plugin-graphql
Query autocompletion in your editor
We’re collaborating
with Facebook and
others on a new
language service to
power GraphQL
features across editors
and IDEs.
jimkyndemeyer/js-
graphql-intellij-plugin
Typed code generation: Swift, Java, TS, Flow
The above query combined with schema
information outputs the type definitions on
the right.
apollostack/apollo-codegen
GraphQL: Enabling a new generation of API developer tools
Static queries for perf and security
• Use fragments for static composition.
• Queries sent to the server are predictable,
and can be optimized.
• Data requirements of app can be fully
analyzed at build time.
• Better security with persisted queries.
Write your data requirements so that
tooling can separate them from your UI
code
C L I E N T S
Plain fetch
Simple
Predictable
No UI consistency and performance
features
Caching client
Some work required to set up and learn
Easy to update the UI
Manage data in one place
Great dev tools
GET
GraphQL clients
Easy to bind data to your UI
Visit dev.apollodata.com for more
code snippets.
Chrome dev tools for Apollo
Another benefit of using a sophisticated client is
integrated tooling to understand your app.
Chrome dev tools for Apollo
Another benefit of using a sophisticated client is
integrated tooling to understand your app.
Chrome dev tools for Apollo
Another benefit of using a sophisticated client is
integrated tooling to understand your app.
P R O D U C T I O N
I N S I G H T S
Backend point of view
const HumanQuery = gql`
query Human {
human(id: "1000") {
name
height(unit: FOOT)
}
}
`;
Know exactly which parts of the code are using the fields and endpoints in the API,
at runtime and statically, to evaluate backend changes and ask UI devs
Query
human
Human
name
height
friends
Frontend point of view
query Human {
human {
name
weather
friends {
name
}
}
}
Get insight into query performance to fix loading problems without
diving into the backend, or have information to give backend team
query Human
Optics Built entirely with Apollo
and GraphQL!
A tool for GraphQL devs to understand their APIOptics
Conclusion
• GraphQL provides a shared language to
talk about data and queries
• A wealth of tools can make UI devs more
efficient than ever before
• UI developers get insights into
performance and caching
• API devs know who is using the data and
what to optimize for
Enabling a new generation of API
developer tools
GraphQL
Sashko Stubailo
@stubailo
Open Source Lead, Meteor
Want to work on GraphQL and
open source technology full time?
Email me at sashko@meteor.com!
Community docs and general information:
graphql.org
Our Medium publication, with tips and in-depth
articles about GraphQL:
dev-blog.apollodata.com
Apollo OSS and production tools: apollodata.com

More Related Content

PPTX
Introduction to GraphQL
PDF
Intro to GraphQL
PPTX
An intro to GraphQL
PPTX
Introduction to GraphQL
PDF
GraphQL
PDF
Better APIs with GraphQL
PDF
How to GraphQL
PPT
Graphql presentation
Introduction to GraphQL
Intro to GraphQL
An intro to GraphQL
Introduction to GraphQL
GraphQL
Better APIs with GraphQL
How to GraphQL
Graphql presentation

What's hot (20)

PDF
REST vs GraphQL
PPTX
Introduction to graphQL
PDF
React & GraphQL
PDF
GraphQL Fundamentals
PPTX
GraphQL Introduction
PDF
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...
PDF
Introduction to GraphQL
PPTX
GraphQL API Gateway and microservices
PDF
PDF
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
PDF
Graphql
PPTX
Introduction to GraphQL Presentation.pptx
PPTX
Intro GraphQL
PDF
Spring GraphQL
PPTX
REST API Design & Development
PPTX
GraphQL Introduction with Spring Boot
PDF
Getting Started with Spring for GraphQL
PDF
GraphQL Advanced
PDF
Tutorial: Building a GraphQL API in PHP
PPTX
introduction about REST API
REST vs GraphQL
Introduction to graphQL
React & GraphQL
GraphQL Fundamentals
GraphQL Introduction
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...
Introduction to GraphQL
GraphQL API Gateway and microservices
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
Graphql
Introduction to GraphQL Presentation.pptx
Intro GraphQL
Spring GraphQL
REST API Design & Development
GraphQL Introduction with Spring Boot
Getting Started with Spring for GraphQL
GraphQL Advanced
Tutorial: Building a GraphQL API in PHP
introduction about REST API
Ad

Viewers also liked (8)

PDF
Modular GraphQL with Schema Stitching
PDF
GraphQL across the stack: How everything fits together
PDF
GraphQL: The Missing Link Between Frontend and Backend Devs
PDF
The Apollo and GraphQL Stack
PDF
Standing out as a new grad candidate
PDF
Why UI developers love GraphQL
PDF
Adding GraphQL to your existing architecture
PDF
Meteor MIT Tech Talk 9/18/14: Designing a New Platform For Modern Apps
Modular GraphQL with Schema Stitching
GraphQL across the stack: How everything fits together
GraphQL: The Missing Link Between Frontend and Backend Devs
The Apollo and GraphQL Stack
Standing out as a new grad candidate
Why UI developers love GraphQL
Adding GraphQL to your existing architecture
Meteor MIT Tech Talk 9/18/14: Designing a New Platform For Modern Apps
Ad

Similar to GraphQL: Enabling a new generation of API developer tools (20)

PDF
Serverless GraphQL for Product Developers
PDF
Implementing OpenAPI and GraphQL services with gRPC
PDF
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
PPTX
API workshop: Introduction to APIs (TC Camp)
PPTX
apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...
PPTX
SETCON'18 - Ilya labacheuski - GraphQL adventures
PDF
Real Time Serverless Polling App
PPTX
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
PDF
Vinay Kumar [InfluxData] | InfluxDB API Overview | InfluxDays 2022
PDF
React and GraphQL at Stripe
PPTX
Delivering Developer Tools at Scale
PDF
Graphql usage
PPTX
Web Dev 21-01-2024.pptx
PDF
Ibm_interconnect_restapi_workshop
PDF
Content Strategy and Developer Engagement for DevPortals
PDF
Practices and tools for building better API (JFall 2013)
PDF
Practices and tools for building better APIs
PDF
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
PDF
Seattle StrongLoop Node.js Workshop
PDF
The ultimate api checklist by Blendr.io
Serverless GraphQL for Product Developers
Implementing OpenAPI and GraphQL services with gRPC
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
API workshop: Introduction to APIs (TC Camp)
apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...
SETCON'18 - Ilya labacheuski - GraphQL adventures
Real Time Serverless Polling App
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
Vinay Kumar [InfluxData] | InfluxDB API Overview | InfluxDays 2022
React and GraphQL at Stripe
Delivering Developer Tools at Scale
Graphql usage
Web Dev 21-01-2024.pptx
Ibm_interconnect_restapi_workshop
Content Strategy and Developer Engagement for DevPortals
Practices and tools for building better API (JFall 2013)
Practices and tools for building better APIs
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
Seattle StrongLoop Node.js Workshop
The ultimate api checklist by Blendr.io

Recently uploaded (20)

PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PDF
Ensemble model-based arrhythmia classification with local interpretable model...
PDF
Connector Corner: Transform Unstructured Documents with Agentic Automation
PDF
Electrocardiogram sequences data analytics and classification using unsupervi...
PDF
Advancing precision in air quality forecasting through machine learning integ...
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PDF
Build Real-Time ML Apps with Python, Feast & NoSQL
PPTX
Build automations faster and more reliably with UiPath ScreenPlay
PDF
Aug23rd - Mulesoft Community Workshop - Hyd, India.pdf
PDF
Human Computer Interaction Miterm Lesson
PDF
LMS bot: enhanced learning management systems for improved student learning e...
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PDF
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
Ensemble model-based arrhythmia classification with local interpretable model...
Connector Corner: Transform Unstructured Documents with Agentic Automation
Electrocardiogram sequences data analytics and classification using unsupervi...
Advancing precision in air quality forecasting through machine learning integ...
MuleSoft-Compete-Deck for midddleware integrations
Build Real-Time ML Apps with Python, Feast & NoSQL
Build automations faster and more reliably with UiPath ScreenPlay
Aug23rd - Mulesoft Community Workshop - Hyd, India.pdf
Human Computer Interaction Miterm Lesson
LMS bot: enhanced learning management systems for improved student learning e...
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
NewMind AI Weekly Chronicles – August ’25 Week IV
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
Lung cancer patients survival prediction using outlier detection and optimize...
Early detection and classification of bone marrow changes in lumbar vertebrae...
AI-driven Assurance Across Your End-to-end Network With ThousandEyes

GraphQL: Enabling a new generation of API developer tools

  • 1. Enabling a new generation of API developer tools GraphQL Sashko Stubailo @stubailo Apollo Open Source Lead, Meteor
  • 2. Browser Web Server C L I E N T S E R V E R A B R I E F H I S T O R Y O F W E B A P P S <HTML /> Sending HTML from a web server to a browser
  • 3. JavaScript UI API Server C L I E N T S E R V E R A B R I E F H I S T O R Y O F W E B A P P S { data } Sending data from an API server to a single-page app, for better performance
  • 4. JavaScript UI API Server C L I E N T S E R V E R A B R I E F H I S T O R Y O F A P P S { data } Sending data from an API server to multiple clients in different environments Native iOS app
  • 5. CordovaBrowser Native Microservice Microservice Microservice C L I E N T S E R V E R A B R I E F H I S T O R Y O F A P P S Splitting into microservices, waterfall loading and multiple APIs
  • 6. CordovaBrowser Native Microservice Microservice Microservice C L I E N T S E R V E R A B R I E F H I S T O R Y O F A P P S Add an API gateway, now there’s a development bottleneck API gateway
  • 7. Too many API endpoints, one per UI feature API endpoints don’t meet UI needs Possible performance or security issues to ship faster Takes too long to build the API for a new feature Frontend team develops API Backend team develops API
  • 8. CordovaBrowser Native Microservice Microservice Microservice C L I E N T S E R V E R T H E F U T U R E O F A P P S The solution: GraphQL as the translation layer between frontend and backend GraphQL API gateway
  • 9. Best of both worlds? Let’s look at the benefits…
  • 10. Flexible: “Make your own endpoints” query Human { human(id: "1000") { name height(unit: FOOT) } } { "human": { "name": "Luke Skywalker", "height": 5.6430448 } } • Choose from your API’s schema of types, fields, and arguments • Computed fields, parameters, type conditions, and more • Validates queries for you
  • 11. Performance: Get what you need • No need to hit multiple endpoints to render one page • Select only the fields that are needed • Batch across all data requirements • Eliminate unnecessary fetching with fancy clients, such as Apollo and Relay query Human { human(id: "1000") { name avatar(size: SMALL) friends { name } } }
  • 12. Not just a tool: An open source spec S E R V E R S • Plain HTTP request • React • Angular • Vue • Polymer • Native iOS/Android C L I E N T S • Node.js • Ruby • Python • Scala • Java • Erlang T O O L S • API explorer (GraphiQL) • Editor autocomplete • Query validation • Mocking • Performance analysis • Code generation …and more
  • 13. Think carefully about API needs Hardcode special endpoints User Interface Backend W I T H R E S T
  • 14. Ask for data Get the data User Interface Backend W I T H G R A P H Q L
  • 15. A better API experience
  • 16. T O O L S
  • 17. GraphiQL query editor GraphQL APIs are inherently self-documenting
  • 18. Static query analysis inside your code Without running the code, find: • Typos in fields • Wrong arguments • Deprecated fields • Identify field usage apollostack/eslint-plugin-graphql
  • 19. Query autocompletion in your editor We’re collaborating with Facebook and others on a new language service to power GraphQL features across editors and IDEs. jimkyndemeyer/js- graphql-intellij-plugin
  • 20. Typed code generation: Swift, Java, TS, Flow The above query combined with schema information outputs the type definitions on the right. apollostack/apollo-codegen
  • 22. Static queries for perf and security • Use fragments for static composition. • Queries sent to the server are predictable, and can be optimized. • Data requirements of app can be fully analyzed at build time. • Better security with persisted queries. Write your data requirements so that tooling can separate them from your UI code
  • 23. C L I E N T S
  • 24. Plain fetch Simple Predictable No UI consistency and performance features Caching client Some work required to set up and learn Easy to update the UI Manage data in one place Great dev tools GET GraphQL clients
  • 25. Easy to bind data to your UI Visit dev.apollodata.com for more code snippets.
  • 26. Chrome dev tools for Apollo Another benefit of using a sophisticated client is integrated tooling to understand your app.
  • 27. Chrome dev tools for Apollo Another benefit of using a sophisticated client is integrated tooling to understand your app.
  • 28. Chrome dev tools for Apollo Another benefit of using a sophisticated client is integrated tooling to understand your app.
  • 29. P R O D U C T I O N I N S I G H T S
  • 30. Backend point of view const HumanQuery = gql` query Human { human(id: "1000") { name height(unit: FOOT) } } `; Know exactly which parts of the code are using the fields and endpoints in the API, at runtime and statically, to evaluate backend changes and ask UI devs Query human Human name height friends
  • 31. Frontend point of view query Human { human { name weather friends { name } } } Get insight into query performance to fix loading problems without diving into the backend, or have information to give backend team query Human
  • 32. Optics Built entirely with Apollo and GraphQL!
  • 33. A tool for GraphQL devs to understand their APIOptics
  • 34. Conclusion • GraphQL provides a shared language to talk about data and queries • A wealth of tools can make UI devs more efficient than ever before • UI developers get insights into performance and caching • API devs know who is using the data and what to optimize for
  • 35. Enabling a new generation of API developer tools GraphQL Sashko Stubailo @stubailo Open Source Lead, Meteor Want to work on GraphQL and open source technology full time? Email me at [email protected]! Community docs and general information: graphql.org Our Medium publication, with tips and in-depth articles about GraphQL: dev-blog.apollodata.com Apollo OSS and production tools: apollodata.com