SlideShare a Scribd company logo
{
name
web
role
company
}
type User {
id: String!
name: String!
web: Web!
role: Role!
company: String!
}
{
“name”: “Nicola Molinari”,
“web”: {
“twitter”: “emmenko”,
“github”: “emmenko”,
},
“role”: “SOFTWARE_ENGINEER”,
“company”: “commercetools”
}
⇒ ⇒
We should share more
brown field examples.
How We Use GraphQL At Commercetools
How it started
React Europe 2015
Release of GraphQL Spec
Oleg
Reading the GraphQL Spec
‘till late that night.
From there was born
http://sangria-graphql.org/
Scala GraphQL implementation
GraphQL Munich Meetup #1 - How We Use GraphQL At Commercetools
Merchant CenterMerchant Center
UI Application
To manage the data in
the platform.
UI Application
To manage the data in
the platform.
UI Application
To manage the data in
the platform.
UI Application
To manage the data in
the platform.
● Powered by React
● Designed to be User Friendly
● Focus on Enterprise Features
Nowadays building good UI
Applications is hard.
>> JavaScript Fatigue
https://code-cartoons.com - Lin Clark
Data Fetching: underfetching / overfetching
Experience #1
Feature
User can see and explore a category tree.
How categories work in commercetools platform
[
{
// root category
"id": "1",
"key": "shoes",
"parent": null,
"ancestors": []
},
{
// subcategory of `shoes`
"id": "2",
"key": "sport-shoes",
"parent": { "id": "1", "typeId": "category" },
"ancestors": [{ "id": "1", "typeId": "category" }]
}
]
Fetching categories with their children (REST API)
`parent = null`
(root categories)
`parent = “1”`
(subcategories of “1”)
id: “1”
`parent = “2”`
(subcategories of “2”)
id: “2”
3 requests
User can see and explore a category tree,
and see the number of subcategories and the number
of products assigned to the category.
(new) Feature
Fetching categories, # of subcategories, # of products
`parent = null`
(root categories)
`parent = “1”`
(subcategories of “1”)
id: “1”
`parent = “2”`
(subcategories of “2”)
id: “2”
2n+1 requests
# sub.
# prod.
0..n
0..n
# sub.
# prod.
0..n
0..n
“2n + 1” problem
> 100 requests in a project with an average
number of categories
{
categories(parent: “1”) {
id
}
}
{
categories(parent: “1”) {
id
childCount
productCount
children {
id
childCount
productCount
}
}
}
GraphQL Munich Meetup #1 - How We Use GraphQL At Commercetools
We were able to
solve a big problem
with a small effort.
What if we would build it with REST?
What if we would build it with REST?
● Build a new endpoint with the extra fields
What if we would build it with REST?
● Build a new endpoint with the extra fields
Increase maintenance
What if we would build it with REST?
● Build a new endpoint with the extra fields
Increase maintenance
It’s a public API, but just for one case
What if we would build it with REST?
● Build a new endpoint with the extra fields
Increase maintenance
It’s a public API, but just for one case
● Add the extra fields to the existing endpoint
What if we would build it with REST?
● Build a new endpoint with the extra fields
Increase maintenance
It’s a public API, but just for one case
● Add the extra fields to the existing endpoint
Possibly a huge performance hit
What if we would build it with REST?
● Build a new endpoint with the extra fields
Increase maintenance
It’s a public API, but just for one case
● Add the extra fields to the existing endpoint
Possibly a huge performance hit
There were not enough use cases to justify a change in the API
With GraphQL
With GraphQL
● Easy to extend the schema
With GraphQL
● Easy to extend the schema
● Does not affect maintainability (only 1 API / endpoint)
With GraphQL
● Easy to extend the schema
● Does not affect maintainability (only 1 API / endpoint)
● Performance hit on a field level, only when requested
Extend the existing API
without affecting its
performance.
Enable optimizations on a
field level.
Experience #2
Client
HTTP API
/user
/projects
/organizations
/project-settings
Bootstrapping the client application
GraphQL Munich Meetup #1 - How We Use GraphQL At Commercetools
Problems
Problems
● Data was not normalized
Problems
● Data was not normalized
● > 50% of the data was never used
Problems
● Data was not normalized
● > 50% of the data was never used
● Complicated business logic, hard to follow and understand
Problems
● Data was not normalized
● > 50% of the data was never used
● Complicated business logic, hard to follow and understand
● We had some crucial bugs related to that logic
Feature
Show a list of user permissions.
Technical Refactoring + User Story
Don’t work on Tech Debts alone.
Instead always include them in
a User Story if they bring User
Value.
Technical Requirements for the Refactoring
Technical Requirements for the Refactoring
● Reduce the number of network requests to one when bootstrapping the application
Technical Requirements for the Refactoring
● Reduce the number of network requests to one when bootstrapping the application
● The client should only get the data that is asking for
Technical Requirements for the Refactoring
● Reduce the number of network requests to one when bootstrapping the application
● The client should only get the data that is asking for
● Reduce the complexity of the business logic
Technical Requirements for the Refactoring
● Reduce the number of network requests to one when bootstrapping the application
● The client should only get the data that is asking for
● Reduce the complexity of the business logic
● Have normalized data + caching
Technical Requirements for the Refactoring
● Reduce the number of network requests to one when bootstrapping the application
● The client should only get the data that is asking for
● Reduce the complexity of the business logic
● Have normalized data + caching
● Being able to easily extend the model / schema
Technical Requirements for the Refactoring
● Reduce the number of network requests to one when bootstrapping the application
● The client should only get the data that is asking for
● Reduce the complexity of the business logic
● Have normalized data + caching
● Being able to easily extend the model / schema
● Make it easier to gather metrics
GraphQL Munich Meetup #1 - How We Use GraphQL At Commercetools
Client
HTTP API
/user
/projects
/organizations
/project-settings
Create the GraphQL schema first
Client
HTTP API
/user
/projects
/organizations
/project-settings
Deploy the new endpoint alongside the existing APIs
/graphql
Client
HTTP API
/user
/projects
/organizations
/project-settings
Migrate the client to use Apollo
/graphql
Client
HTTP API
/user
/projects
/organizations
/project-settings
(optional) Remove the old APIs
/graphql
Incrementally migrate your
APIs into a GraphQL
endpoint.
Technical Requirements for the Refactoring
● Reduce the number of network requests to one when bootstrapping the application
● The client should only get the data that is asking for
● Reduce the complexity of the business logic
● Have normalized data + caching
● Being able to easily extend the model / schema
● Make it easier to gather metrics
Technical Requirements for the Refactoring
✅ Reduce the number of network requests to one when bootstrapping the application
● The client should only get the data that is asking for
● Reduce the complexity of the business logic
● Have normalized data + caching
● Being able to easily extend the model / schema
● Make it easier to gather metrics
Technical Requirements for the Refactoring
✅ Reduce the number of network requests to one when bootstrapping the application
✅ The client should only get the data that is asking for
● Reduce the complexity of the business logic
● Have normalized data + caching
● Being able to easily extend the model / schema
● Make it easier to gather metrics
Technical Requirements for the Refactoring
✅ Reduce the number of network requests to one when bootstrapping the application
✅ The client should only get the data that is asking for
✅ Reduce the complexity of the business logic
● Have normalized data + caching
● Being able to easily extend the model / schema
● Make it easier to gather metrics
Technical Requirements for the Refactoring
✅ Reduce the number of network requests to one when bootstrapping the application
✅ The client should only get the data that is asking for
✅ Reduce the complexity of the business logic
✅ Have normalized data + caching
● Being able to easily extend the model / schema
● Make it easier to gather metrics
Technical Requirements for the Refactoring
✅ Reduce the number of network requests to one when bootstrapping the application
✅ The client should only get the data that is asking for
✅ Reduce the complexity of the business logic
✅ Have normalized data + caching
✅ Being able to easily extend the model / schema
● Make it easier to gather metrics
Technical Requirements for the Refactoring
✅ Reduce the number of network requests to one when bootstrapping the application
✅ The client should only get the data that is asking for
✅ Reduce the complexity of the business logic
✅ Have normalized data + caching
✅ Being able to easily extend the model / schema
✅ Make it easier to gather metrics
Client
HTTP API
/user
/projects
/organizations
/project-settings
GraphQL Metrics with Apollo Optics
/graphql
GraphQL Munich Meetup #1 - How We Use GraphQL At Commercetools
GraphQL Munich Meetup #1 - How We Use GraphQL At Commercetools
Next steps: optimize queries
slow queriesfast queries
Sangria slow-queries
Sangria slow-queries (profiling)
Sangria slow-queries (metrics)
Our Learnings
Our Learnings
● Incrementally adopt GraphQL to
your existing API
Our Learnings
● Incrementally adopt GraphQL to
your existing API
● Incrementally adopt tools like Apollo
/ Relay next to your code, to reduce
boilerplate code and complexity
Our Learnings
● Incrementally adopt GraphQL to
your existing API
● Incrementally adopt tools like Apollo
/ Relay next to your code, to reduce
boilerplate code and complexity
● GraphQL allows to easily extend
your API with small effort
Our Learnings
● Incrementally adopt GraphQL to
your existing API
● Incrementally adopt tools like Apollo
/ Relay next to your code, to reduce
boilerplate code and complexity
● GraphQL allows to easily extend
your API with small effort
● Performance hits are on a field level,
only when requested
Our Learnings
● Incrementally adopt GraphQL to
your existing API
● Incrementally adopt tools like Apollo
/ Relay next to your code, to reduce
boilerplate code and complexity
● GraphQL allows to easily extend
your API with small effort
● Performance hits are on a field level,
only when requested
● Easy to identify bottlenecks on
specific fields and to optimize those
Thanks
Questions?

More Related Content

What's hot (20)

PPTX
GraphQL Introduction
Serge Huber
 
PDF
GraphQL
Joel Corrêa
 
PPTX
An intro to GraphQL
valuebound
 
PDF
Better APIs with GraphQL
Josh Price
 
PDF
GraphQL + relay
Cédric GILLET
 
PDF
REST vs GraphQL
Squareboat
 
PDF
How to GraphQL
Tomasz Bak
 
PDF
GraphQL & Relay
Viacheslav Slinko
 
PDF
Why UI Developers Love GraphQL - Sashko Stubailo, Apollo/Meteor
Jon Wong
 
PDF
London React August - GraphQL at The Financial Times - Viktor Charypar
React London Community
 
PPTX
Introduction to GraphQL
Rodrigo Prates
 
PDF
The Apollo and GraphQL Stack
Sashko Stubailo
 
PDF
GraphQL
Cédric GILLET
 
PDF
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
Hafiz Ismail
 
PDF
GraphQL: The Missing Link Between Frontend and Backend Devs
Sashko Stubailo
 
PDF
Meteor MIT Tech Talk 9/18/14: Designing a New Platform For Modern Apps
Sashko Stubailo
 
PDF
Performance optimisation with GraphQL
yann_s
 
PDF
Enterprise graph applications
David Colebatch
 
PDF
Intro to GraphQL
Rakuten Group, Inc.
 
GraphQL Introduction
Serge Huber
 
GraphQL
Joel Corrêa
 
An intro to GraphQL
valuebound
 
Better APIs with GraphQL
Josh Price
 
GraphQL + relay
Cédric GILLET
 
REST vs GraphQL
Squareboat
 
How to GraphQL
Tomasz Bak
 
GraphQL & Relay
Viacheslav Slinko
 
Why UI Developers Love GraphQL - Sashko Stubailo, Apollo/Meteor
Jon Wong
 
London React August - GraphQL at The Financial Times - Viktor Charypar
React London Community
 
Introduction to GraphQL
Rodrigo Prates
 
The Apollo and GraphQL Stack
Sashko Stubailo
 
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
Hafiz Ismail
 
GraphQL: The Missing Link Between Frontend and Backend Devs
Sashko Stubailo
 
Meteor MIT Tech Talk 9/18/14: Designing a New Platform For Modern Apps
Sashko Stubailo
 
Performance optimisation with GraphQL
yann_s
 
Enterprise graph applications
David Colebatch
 
Intro to GraphQL
Rakuten Group, Inc.
 

Similar to GraphQL Munich Meetup #1 - How We Use GraphQL At Commercetools (20)

PDF
(ATS6-DEV02) Web Application Strategies
BIOVIA
 
PDF
Angular (v2 and up) - Morning to understand - Linagora
LINAGORA
 
PDF
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Ido Green
 
PDF
Streamlining Workflows: Unleashing Automation with Azure and Power Automate
Hamida Rebai Trabelsi
 
PPTX
Anypoint DataGraph - Consume & Re-use your APIs faster | MuleSoft Mysore Meet...
MysoreMuleSoftMeetup
 
PDF
Salesforce Developer Workshop for GDF Suez Hackathon
Peter Chittum
 
PPTX
Overview and Walkthrough of the Application Programming Model with SAP Cloud ...
SAP Cloud Platform
 
PDF
Your Roadmap for An Enterprise Graph Strategy
Neo4j
 
PPTX
Anypoint Data Graphs
NeerajKumar1965
 
PDF
Scaling Ride-Hailing with Machine Learning on MLflow
Databricks
 
PPTX
Supercharging Optimizely Performance by Moving Decisions to the Edge
Optimizely
 
PDF
Datadog APM Product Launch
Brett Sheppard
 
PDF
PyCon Korea - Real World Graphene
Marcin Gębala
 
PDF
Partner Connect APAC - 2022 - April
confluent
 
PDF
API Management for GraphQL
WSO2
 
PDF
Engage 2013 - Flexible Data Access with APIs
Webtrends
 
PDF
Next-Generation Kubernetes Optimization: Optimize Live 2.0
StormForge .io
 
PDF
Product Keynote: Server and Data Center
Atlassian
 
PDF
Impact2014: Practical Performance Troubleshooting
Chris Bailey
 
PDF
apidays LIVE Paris - GraphQL meshes by Jens Neuse
apidays
 
(ATS6-DEV02) Web Application Strategies
BIOVIA
 
Angular (v2 and up) - Morning to understand - Linagora
LINAGORA
 
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Ido Green
 
Streamlining Workflows: Unleashing Automation with Azure and Power Automate
Hamida Rebai Trabelsi
 
Anypoint DataGraph - Consume & Re-use your APIs faster | MuleSoft Mysore Meet...
MysoreMuleSoftMeetup
 
Salesforce Developer Workshop for GDF Suez Hackathon
Peter Chittum
 
Overview and Walkthrough of the Application Programming Model with SAP Cloud ...
SAP Cloud Platform
 
Your Roadmap for An Enterprise Graph Strategy
Neo4j
 
Anypoint Data Graphs
NeerajKumar1965
 
Scaling Ride-Hailing with Machine Learning on MLflow
Databricks
 
Supercharging Optimizely Performance by Moving Decisions to the Edge
Optimizely
 
Datadog APM Product Launch
Brett Sheppard
 
PyCon Korea - Real World Graphene
Marcin Gębala
 
Partner Connect APAC - 2022 - April
confluent
 
API Management for GraphQL
WSO2
 
Engage 2013 - Flexible Data Access with APIs
Webtrends
 
Next-Generation Kubernetes Optimization: Optimize Live 2.0
StormForge .io
 
Product Keynote: Server and Data Center
Atlassian
 
Impact2014: Practical Performance Troubleshooting
Chris Bailey
 
apidays LIVE Paris - GraphQL meshes by Jens Neuse
apidays
 
Ad

Recently uploaded (20)

PPTX
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
PPTX
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PDF
UITP Summit Meep Pitch may 2025 MaaS Rebooted
campoamor1
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PPTX
Smart Doctor Appointment Booking option in odoo.pptx
AxisTechnolabs
 
PPTX
Function & Procedure: Function Vs Procedure in PL/SQL
Shani Tiwari
 
PPTX
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Simplify React app login with asgardeo-sdk
vaibhav289687
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
UITP Summit Meep Pitch may 2025 MaaS Rebooted
campoamor1
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
Smart Doctor Appointment Booking option in odoo.pptx
AxisTechnolabs
 
Function & Procedure: Function Vs Procedure in PL/SQL
Shani Tiwari
 
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Simplify React app login with asgardeo-sdk
vaibhav289687
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Ad

GraphQL Munich Meetup #1 - How We Use GraphQL At Commercetools

  • 1. { name web role company } type User { id: String! name: String! web: Web! role: Role! company: String! } { “name”: “Nicola Molinari”, “web”: { “twitter”: “emmenko”, “github”: “emmenko”, }, “role”: “SOFTWARE_ENGINEER”, “company”: “commercetools” } ⇒ ⇒
  • 2. We should share more brown field examples.
  • 3. How We Use GraphQL At Commercetools
  • 5. React Europe 2015 Release of GraphQL Spec
  • 6. Oleg Reading the GraphQL Spec ‘till late that night.
  • 7. From there was born http://sangria-graphql.org/ Scala GraphQL implementation
  • 10. UI Application To manage the data in the platform. UI Application To manage the data in the platform.
  • 11. UI Application To manage the data in the platform. UI Application To manage the data in the platform. ● Powered by React ● Designed to be User Friendly ● Focus on Enterprise Features
  • 12. Nowadays building good UI Applications is hard. >> JavaScript Fatigue
  • 13. https://code-cartoons.com - Lin Clark Data Fetching: underfetching / overfetching
  • 15. Feature User can see and explore a category tree.
  • 16. How categories work in commercetools platform [ { // root category "id": "1", "key": "shoes", "parent": null, "ancestors": [] }, { // subcategory of `shoes` "id": "2", "key": "sport-shoes", "parent": { "id": "1", "typeId": "category" }, "ancestors": [{ "id": "1", "typeId": "category" }] } ]
  • 17. Fetching categories with their children (REST API) `parent = null` (root categories) `parent = “1”` (subcategories of “1”) id: “1” `parent = “2”` (subcategories of “2”) id: “2” 3 requests
  • 18. User can see and explore a category tree, and see the number of subcategories and the number of products assigned to the category. (new) Feature
  • 19. Fetching categories, # of subcategories, # of products `parent = null` (root categories) `parent = “1”` (subcategories of “1”) id: “1” `parent = “2”` (subcategories of “2”) id: “2” 2n+1 requests # sub. # prod. 0..n 0..n # sub. # prod. 0..n 0..n
  • 20. “2n + 1” problem
  • 21. > 100 requests in a project with an average number of categories
  • 25. We were able to solve a big problem with a small effort.
  • 26. What if we would build it with REST?
  • 27. What if we would build it with REST? ● Build a new endpoint with the extra fields
  • 28. What if we would build it with REST? ● Build a new endpoint with the extra fields Increase maintenance
  • 29. What if we would build it with REST? ● Build a new endpoint with the extra fields Increase maintenance It’s a public API, but just for one case
  • 30. What if we would build it with REST? ● Build a new endpoint with the extra fields Increase maintenance It’s a public API, but just for one case ● Add the extra fields to the existing endpoint
  • 31. What if we would build it with REST? ● Build a new endpoint with the extra fields Increase maintenance It’s a public API, but just for one case ● Add the extra fields to the existing endpoint Possibly a huge performance hit
  • 32. What if we would build it with REST? ● Build a new endpoint with the extra fields Increase maintenance It’s a public API, but just for one case ● Add the extra fields to the existing endpoint Possibly a huge performance hit There were not enough use cases to justify a change in the API
  • 34. With GraphQL ● Easy to extend the schema
  • 35. With GraphQL ● Easy to extend the schema ● Does not affect maintainability (only 1 API / endpoint)
  • 36. With GraphQL ● Easy to extend the schema ● Does not affect maintainability (only 1 API / endpoint) ● Performance hit on a field level, only when requested
  • 37. Extend the existing API without affecting its performance.
  • 38. Enable optimizations on a field level.
  • 43. Problems ● Data was not normalized
  • 44. Problems ● Data was not normalized ● > 50% of the data was never used
  • 45. Problems ● Data was not normalized ● > 50% of the data was never used ● Complicated business logic, hard to follow and understand
  • 46. Problems ● Data was not normalized ● > 50% of the data was never used ● Complicated business logic, hard to follow and understand ● We had some crucial bugs related to that logic
  • 47. Feature Show a list of user permissions.
  • 49. Don’t work on Tech Debts alone. Instead always include them in a User Story if they bring User Value.
  • 50. Technical Requirements for the Refactoring
  • 51. Technical Requirements for the Refactoring ● Reduce the number of network requests to one when bootstrapping the application
  • 52. Technical Requirements for the Refactoring ● Reduce the number of network requests to one when bootstrapping the application ● The client should only get the data that is asking for
  • 53. Technical Requirements for the Refactoring ● Reduce the number of network requests to one when bootstrapping the application ● The client should only get the data that is asking for ● Reduce the complexity of the business logic
  • 54. Technical Requirements for the Refactoring ● Reduce the number of network requests to one when bootstrapping the application ● The client should only get the data that is asking for ● Reduce the complexity of the business logic ● Have normalized data + caching
  • 55. Technical Requirements for the Refactoring ● Reduce the number of network requests to one when bootstrapping the application ● The client should only get the data that is asking for ● Reduce the complexity of the business logic ● Have normalized data + caching ● Being able to easily extend the model / schema
  • 56. Technical Requirements for the Refactoring ● Reduce the number of network requests to one when bootstrapping the application ● The client should only get the data that is asking for ● Reduce the complexity of the business logic ● Have normalized data + caching ● Being able to easily extend the model / schema ● Make it easier to gather metrics
  • 59. Client HTTP API /user /projects /organizations /project-settings Deploy the new endpoint alongside the existing APIs /graphql
  • 62. Incrementally migrate your APIs into a GraphQL endpoint.
  • 63. Technical Requirements for the Refactoring ● Reduce the number of network requests to one when bootstrapping the application ● The client should only get the data that is asking for ● Reduce the complexity of the business logic ● Have normalized data + caching ● Being able to easily extend the model / schema ● Make it easier to gather metrics
  • 64. Technical Requirements for the Refactoring ✅ Reduce the number of network requests to one when bootstrapping the application ● The client should only get the data that is asking for ● Reduce the complexity of the business logic ● Have normalized data + caching ● Being able to easily extend the model / schema ● Make it easier to gather metrics
  • 65. Technical Requirements for the Refactoring ✅ Reduce the number of network requests to one when bootstrapping the application ✅ The client should only get the data that is asking for ● Reduce the complexity of the business logic ● Have normalized data + caching ● Being able to easily extend the model / schema ● Make it easier to gather metrics
  • 66. Technical Requirements for the Refactoring ✅ Reduce the number of network requests to one when bootstrapping the application ✅ The client should only get the data that is asking for ✅ Reduce the complexity of the business logic ● Have normalized data + caching ● Being able to easily extend the model / schema ● Make it easier to gather metrics
  • 67. Technical Requirements for the Refactoring ✅ Reduce the number of network requests to one when bootstrapping the application ✅ The client should only get the data that is asking for ✅ Reduce the complexity of the business logic ✅ Have normalized data + caching ● Being able to easily extend the model / schema ● Make it easier to gather metrics
  • 68. Technical Requirements for the Refactoring ✅ Reduce the number of network requests to one when bootstrapping the application ✅ The client should only get the data that is asking for ✅ Reduce the complexity of the business logic ✅ Have normalized data + caching ✅ Being able to easily extend the model / schema ● Make it easier to gather metrics
  • 69. Technical Requirements for the Refactoring ✅ Reduce the number of network requests to one when bootstrapping the application ✅ The client should only get the data that is asking for ✅ Reduce the complexity of the business logic ✅ Have normalized data + caching ✅ Being able to easily extend the model / schema ✅ Make it easier to gather metrics
  • 73. Next steps: optimize queries slow queriesfast queries
  • 78. Our Learnings ● Incrementally adopt GraphQL to your existing API
  • 79. Our Learnings ● Incrementally adopt GraphQL to your existing API ● Incrementally adopt tools like Apollo / Relay next to your code, to reduce boilerplate code and complexity
  • 80. Our Learnings ● Incrementally adopt GraphQL to your existing API ● Incrementally adopt tools like Apollo / Relay next to your code, to reduce boilerplate code and complexity ● GraphQL allows to easily extend your API with small effort
  • 81. Our Learnings ● Incrementally adopt GraphQL to your existing API ● Incrementally adopt tools like Apollo / Relay next to your code, to reduce boilerplate code and complexity ● GraphQL allows to easily extend your API with small effort ● Performance hits are on a field level, only when requested
  • 82. Our Learnings ● Incrementally adopt GraphQL to your existing API ● Incrementally adopt tools like Apollo / Relay next to your code, to reduce boilerplate code and complexity ● GraphQL allows to easily extend your API with small effort ● Performance hits are on a field level, only when requested ● Easy to identify bottlenecks on specific fields and to optimize those