SlideShare une entreprise Scribd logo
1  sur  34
Télécharger pour lire hors ligne
Bringing a public GraphQL API
from beta to production ready
at scale
Yann Simon
What is commercetools
commercetools
API
/products
/carts
…
merchant
center
Single page
app
Mobile app
cloud
functions
cloud queues
Server
Web / app
GraphQL @ commercetools
from 2015 to 2020
2015
• July 2015: Facebook published the first draft of the GraphQL specification

• October 2015: first experimental GraphQL support at commercetools
2015 - 2020
• from 2018, more & more GraphQL traffic
2020
What happened?
• Scaling up

• operation

• development of GraphQL API (speed, quality)

• performances
Scaling up operations
Protection against complex queries
{
products {
results {
id
version
}
}
}
needs more resources to run
{
products {
results {
id
version
productType {
name
}
}
}
}
fetch the productType
Protection against malicious queries
• Query complexity analysis based on schema and resolution strategies

• Too complex queries are blocked

• more info:

• https://www.apollographql.com/blog/securing-your-graphql-api-from-
malicious-queries-16130a324a6b/

• https://sangria-graphql.github.io/learn/#protection-against-malicious-
queries
Add info to HTTP log entries
method path status code
GET /products 200
POST /carts 201
GET /reviews/79323 404
DELETE /product-discounts/47393 500
Add info to HTTP log entries
method path status code
POST /graphql 200
POST /graphql 200
POST /graphql 200
POST /graphql 200
operation
type
top level fields complexity
number of
errors
Query
products,
category
650 0
Mutation cart 140 0
Query review 340 0
Mutation productDiscount 500 1
Metrics
Slow logs
• log slow queries





• ‼ do not log sensitive data ‼
Scaling up operations
• protection against malicious queries

• more info to http logs

• metrics

• slow logs

• confidence in operating a GraphQL API at scale
Scaling up GraphQL API
development
Internal usage
• Internal applications are using the GraphQL API

(merchant center, demo shop)

• shorter feedback loops

• improve API design

• Frontend and Backend working together
API consistency - schema validations
• General conventions for API consistency



• Internal validations based on the schema
[ERROR] Caused by: sangria.schema.SchemaValidationException: Schema does not pass validation. Violations:
[ERROR] Output object 'Category' contains a localized string field named 'name' which does not follow the 'xxx' !-> String + 'xxxAllLocales' !-> List(LocalizedString) naming convention.
[ERROR] at sangria.schema.SchemaValidationRule$.validateWithException(SchemaValidationRule.scala:42)
[ERROR] at sangria.schema.Schema.<init>(Schema.scala:939)
Automation of GraphQL Schema
• Our REST API is following a CQRS architecture

• different models for queries and mutations

• Based on this model, generate GraphQL schema

• Use schema introspection to test what is exposed
Automation of API release notes
• Production schema !== in development schema

• Based on the differences, generate markdown file for public release notes
schema deprecations
Scaling up API development
• Faster feedback loops

• internal usage

• Faster development

• generating GraphQL types from REST API models

• schema validations for API consistency

• public release notes

• Using deprecations to evolve

• Graphql coverage is almost complete
Scaling up performances
more tools for external developers
• Expose query complexity as HTTP header

https://docs.commercetools.com/api/graphql#query-complexity

• Profiling
query optimization
Client Server Database
Optimize payload
Servers to servers
Migrating our Apple WatchOS Commerce App to GraphQL
query optimization
Client Server Database
Optimize query

Do not select all fields
Performance optimization (GraphQL meetup in Berlin)
Inspect live servers
Scaling up performances
• Give tools for users of the API

• Optimize database queries based on GraphQL query

• Inspect live servers

• Continuous process
Evolving a public Graph API
from experimental to production ready
needs investments in different areas
Invest in automation
Invest in operations
Continuous improvement
Involve everyone
Being production ready for
more GraphQL traffic

Contenu connexe

Tendances

Data-driven development with GraphQL and Flow
Data-driven development with GraphQL and FlowData-driven development with GraphQL and Flow
Data-driven development with GraphQL and FlowKang Jin Chia
 
CONDG April 23 2020 - Baskar Rao - GraphQL
CONDG April 23 2020 - Baskar Rao - GraphQLCONDG April 23 2020 - Baskar Rao - GraphQL
CONDG April 23 2020 - Baskar Rao - GraphQLMatthew Groves
 
Building Real-Time Search at MailChimp
Building Real-Time Search at MailChimpBuilding Real-Time Search at MailChimp
Building Real-Time Search at MailChimpAll Things Open
 
LeanIX GraphQL Lessons Learned - CodeTalks 2017
LeanIX GraphQL Lessons Learned - CodeTalks 2017LeanIX GraphQL Lessons Learned - CodeTalks 2017
LeanIX GraphQL Lessons Learned - CodeTalks 2017LeanIX GmbH
 
GraphQL over REST at Reactathon 2018
GraphQL over REST at Reactathon 2018GraphQL over REST at Reactathon 2018
GraphQL over REST at Reactathon 2018Sashko Stubailo
 
Introduction to graphQL
Introduction to graphQLIntroduction to graphQL
Introduction to graphQLMuhilvarnan V
 
Serverless GraphQL for Product Developers
Serverless GraphQL for Product DevelopersServerless GraphQL for Product Developers
Serverless GraphQL for Product DevelopersSashko Stubailo
 
GraphQL: The Missing Link Between Frontend and Backend Devs
GraphQL: The Missing Link Between Frontend and Backend DevsGraphQL: The Missing Link Between Frontend and Backend Devs
GraphQL: The Missing Link Between Frontend and Backend DevsSashko Stubailo
 
Real Time Serverless Polling App
Real Time Serverless Polling AppReal Time Serverless Polling App
Real Time Serverless Polling AppSrushith Repakula
 
REST vs GraphQL
REST vs GraphQLREST vs GraphQL
REST vs GraphQLSquareboat
 
Building Push Triggers for Logic Apps
Building Push Triggers for Logic AppsBuilding Push Triggers for Logic Apps
Building Push Triggers for Logic AppsBizTalk360
 
The Apollo and GraphQL Stack
The Apollo and GraphQL StackThe Apollo and GraphQL Stack
The Apollo and GraphQL StackSashko Stubailo
 
Automated Testing with Selenium
Automated Testing with SeleniumAutomated Testing with Selenium
Automated Testing with SeleniumRobert Kaiser
 
GraphQL Introduction
GraphQL IntroductionGraphQL Introduction
GraphQL Introductionbobo52310
 
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4j
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4jGraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4j
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4jNeo4j
 
Fifth elephant 2017 Data Pipeline workshop
Fifth elephant 2017 Data Pipeline workshopFifth elephant 2017 Data Pipeline workshop
Fifth elephant 2017 Data Pipeline workshopKetan Khairnar
 

Tendances (20)

Data-driven development with GraphQL and Flow
Data-driven development with GraphQL and FlowData-driven development with GraphQL and Flow
Data-driven development with GraphQL and Flow
 
CONDG April 23 2020 - Baskar Rao - GraphQL
CONDG April 23 2020 - Baskar Rao - GraphQLCONDG April 23 2020 - Baskar Rao - GraphQL
CONDG April 23 2020 - Baskar Rao - GraphQL
 
Building Real-Time Search at MailChimp
Building Real-Time Search at MailChimpBuilding Real-Time Search at MailChimp
Building Real-Time Search at MailChimp
 
LeanIX GraphQL Lessons Learned - CodeTalks 2017
LeanIX GraphQL Lessons Learned - CodeTalks 2017LeanIX GraphQL Lessons Learned - CodeTalks 2017
LeanIX GraphQL Lessons Learned - CodeTalks 2017
 
GraphQL over REST at Reactathon 2018
GraphQL over REST at Reactathon 2018GraphQL over REST at Reactathon 2018
GraphQL over REST at Reactathon 2018
 
Introduction to graphQL
Introduction to graphQLIntroduction to graphQL
Introduction to graphQL
 
Serverless GraphQL for Product Developers
Serverless GraphQL for Product DevelopersServerless GraphQL for Product Developers
Serverless GraphQL for Product Developers
 
GraphQL: The Missing Link Between Frontend and Backend Devs
GraphQL: The Missing Link Between Frontend and Backend DevsGraphQL: The Missing Link Between Frontend and Backend Devs
GraphQL: The Missing Link Between Frontend and Backend Devs
 
Graphql
GraphqlGraphql
Graphql
 
Graphql
GraphqlGraphql
Graphql
 
Real Time Serverless Polling App
Real Time Serverless Polling AppReal Time Serverless Polling App
Real Time Serverless Polling App
 
REST vs GraphQL
REST vs GraphQLREST vs GraphQL
REST vs GraphQL
 
Building Push Triggers for Logic Apps
Building Push Triggers for Logic AppsBuilding Push Triggers for Logic Apps
Building Push Triggers for Logic Apps
 
The Apollo and GraphQL Stack
The Apollo and GraphQL StackThe Apollo and GraphQL Stack
The Apollo and GraphQL Stack
 
Automated Testing with Selenium
Automated Testing with SeleniumAutomated Testing with Selenium
Automated Testing with Selenium
 
GraphQL Introduction
GraphQL IntroductionGraphQL Introduction
GraphQL Introduction
 
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4j
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4jGraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4j
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4j
 
Fifth elephant 2017 Data Pipeline workshop
Fifth elephant 2017 Data Pipeline workshopFifth elephant 2017 Data Pipeline workshop
Fifth elephant 2017 Data Pipeline workshop
 
Eclipsecon2010
Eclipsecon2010Eclipsecon2010
Eclipsecon2010
 
GraphQL Fundamentals
GraphQL FundamentalsGraphQL Fundamentals
GraphQL Fundamentals
 

Similaire à Bringing a public GraphQL API from beta to production ready

angular-concepts-introduction-slides.pptx
angular-concepts-introduction-slides.pptxangular-concepts-introduction-slides.pptx
angular-concepts-introduction-slides.pptxshekharmpatil1309
 
Webinar June 2017 l Apica LoadTest to compliment HP Loadrunner
Webinar June 2017 l Apica LoadTest to compliment HP LoadrunnerWebinar June 2017 l Apica LoadTest to compliment HP Loadrunner
Webinar June 2017 l Apica LoadTest to compliment HP LoadrunnerWhitney Donaldson
 
AWS re:Invent 2016: Enabling DevOps for an Enterprise with AWS Service Catalo...
AWS re:Invent 2016: Enabling DevOps for an Enterprise with AWS Service Catalo...AWS re:Invent 2016: Enabling DevOps for an Enterprise with AWS Service Catalo...
AWS re:Invent 2016: Enabling DevOps for an Enterprise with AWS Service Catalo...Amazon Web Services
 
Your API on Steroids - Retrofitting GraphQL by Code, Cloud Native or Serverless
Your API on Steroids - Retrofitting GraphQL by Code, Cloud Native or ServerlessYour API on Steroids - Retrofitting GraphQL by Code, Cloud Native or Serverless
Your API on Steroids - Retrofitting GraphQL by Code, Cloud Native or ServerlessQAware GmbH
 
Angular 4 for Java Developers
Angular 4 for Java DevelopersAngular 4 for Java Developers
Angular 4 for Java DevelopersYakov Fain
 
How to provide a GraphQL API - I want it that way
How to provide a GraphQL API - I want it that wayHow to provide a GraphQL API - I want it that way
How to provide a GraphQL API - I want it that wayQAware GmbH
 
Hackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platformHackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platformIhor Uzhvenko
 
Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018Loiane Groner
 
Apica Company Summary 2016
Apica Company Summary 2016Apica Company Summary 2016
Apica Company Summary 2016Apica
 
Your API on Steroids
Your API on Steroids Your API on Steroids
Your API on Steroids QAware GmbH
 
Serverless Angular, Material, Firebase and Google Cloud applications
Serverless Angular, Material, Firebase and Google Cloud applicationsServerless Angular, Material, Firebase and Google Cloud applications
Serverless Angular, Material, Firebase and Google Cloud applicationsLoiane Groner
 
Microservice Automated Testing on Kubernetes
Microservice Automated Testing on KubernetesMicroservice Automated Testing on Kubernetes
Microservice Automated Testing on KubernetesShane Galvin
 
Managing the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS LambdaManaging the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS LambdaAmazon Web Services
 
Deploying GraphQL Services as Managed APIs
Deploying GraphQL Services as Managed APIsDeploying GraphQL Services as Managed APIs
Deploying GraphQL Services as Managed APIsWSO2
 
Scala Italy 2015 - Hands On ScalaJS
Scala Italy 2015 - Hands On ScalaJSScala Italy 2015 - Hands On ScalaJS
Scala Italy 2015 - Hands On ScalaJSAlberto Paro
 
Alberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.jsAlberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.jsScala Italy
 
AWS Community Day - Piyali Kamra - Conversational AI Ecosystem on AWS
AWS Community Day - Piyali Kamra - Conversational AI Ecosystem on AWSAWS Community Day - Piyali Kamra - Conversational AI Ecosystem on AWS
AWS Community Day - Piyali Kamra - Conversational AI Ecosystem on AWSAWS Chicago
 

Similaire à Bringing a public GraphQL API from beta to production ready (20)

Graphql usage
Graphql usageGraphql usage
Graphql usage
 
angular-concepts-introduction-slides.pptx
angular-concepts-introduction-slides.pptxangular-concepts-introduction-slides.pptx
angular-concepts-introduction-slides.pptx
 
Webinar June 2017 l Apica LoadTest to compliment HP Loadrunner
Webinar June 2017 l Apica LoadTest to compliment HP LoadrunnerWebinar June 2017 l Apica LoadTest to compliment HP Loadrunner
Webinar June 2017 l Apica LoadTest to compliment HP Loadrunner
 
AWS re:Invent 2016: Enabling DevOps for an Enterprise with AWS Service Catalo...
AWS re:Invent 2016: Enabling DevOps for an Enterprise with AWS Service Catalo...AWS re:Invent 2016: Enabling DevOps for an Enterprise with AWS Service Catalo...
AWS re:Invent 2016: Enabling DevOps for an Enterprise with AWS Service Catalo...
 
Your API on Steroids - Retrofitting GraphQL by Code, Cloud Native or Serverless
Your API on Steroids - Retrofitting GraphQL by Code, Cloud Native or ServerlessYour API on Steroids - Retrofitting GraphQL by Code, Cloud Native or Serverless
Your API on Steroids - Retrofitting GraphQL by Code, Cloud Native or Serverless
 
Angular 4 for Java Developers
Angular 4 for Java DevelopersAngular 4 for Java Developers
Angular 4 for Java Developers
 
How to provide a GraphQL API - I want it that way
How to provide a GraphQL API - I want it that wayHow to provide a GraphQL API - I want it that way
How to provide a GraphQL API - I want it that way
 
Hackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platformHackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platform
 
Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018
 
Apica Company Summary 2016
Apica Company Summary 2016Apica Company Summary 2016
Apica Company Summary 2016
 
Your API on Steroids
Your API on Steroids Your API on Steroids
Your API on Steroids
 
Serverless Angular, Material, Firebase and Google Cloud applications
Serverless Angular, Material, Firebase and Google Cloud applicationsServerless Angular, Material, Firebase and Google Cloud applications
Serverless Angular, Material, Firebase and Google Cloud applications
 
Asp.Net MVC 5 in Arabic
Asp.Net MVC 5 in ArabicAsp.Net MVC 5 in Arabic
Asp.Net MVC 5 in Arabic
 
Microservice Automated Testing on Kubernetes
Microservice Automated Testing on KubernetesMicroservice Automated Testing on Kubernetes
Microservice Automated Testing on Kubernetes
 
Managing the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS LambdaManaging the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS Lambda
 
Deploying GraphQL Services as Managed APIs
Deploying GraphQL Services as Managed APIsDeploying GraphQL Services as Managed APIs
Deploying GraphQL Services as Managed APIs
 
React inter3
React inter3React inter3
React inter3
 
Scala Italy 2015 - Hands On ScalaJS
Scala Italy 2015 - Hands On ScalaJSScala Italy 2015 - Hands On ScalaJS
Scala Italy 2015 - Hands On ScalaJS
 
Alberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.jsAlberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.js
 
AWS Community Day - Piyali Kamra - Conversational AI Ecosystem on AWS
AWS Community Day - Piyali Kamra - Conversational AI Ecosystem on AWSAWS Community Day - Piyali Kamra - Conversational AI Ecosystem on AWS
AWS Community Day - Piyali Kamra - Conversational AI Ecosystem on AWS
 

Plus de yann_s

FS2 mongo reactivestreams
FS2 mongo reactivestreamsFS2 mongo reactivestreams
FS2 mongo reactivestreamsyann_s
 
Introduction to rust: a low-level language with high-level abstractions
Introduction to rust: a low-level language with high-level abstractionsIntroduction to rust: a low-level language with high-level abstractions
Introduction to rust: a low-level language with high-level abstractionsyann_s
 
Performance optimisation with GraphQL
Performance optimisation with GraphQLPerformance optimisation with GraphQL
Performance optimisation with GraphQLyann_s
 
Introduction to GraphQL at API days
Introduction to GraphQL at API daysIntroduction to GraphQL at API days
Introduction to GraphQL at API daysyann_s
 
Introduction to type classes in Scala
Introduction to type classes in ScalaIntroduction to type classes in Scala
Introduction to type classes in Scalayann_s
 
Compile time dependency injection in Play 2.4 with macwire
Compile time dependency injection in Play 2.4 with macwireCompile time dependency injection in Play 2.4 with macwire
Compile time dependency injection in Play 2.4 with macwireyann_s
 
Structure your Play application with the cake pattern (and test it)
Structure your Play application with the cake pattern (and test it)Structure your Play application with the cake pattern (and test it)
Structure your Play application with the cake pattern (and test it)yann_s
 

Plus de yann_s (7)

FS2 mongo reactivestreams
FS2 mongo reactivestreamsFS2 mongo reactivestreams
FS2 mongo reactivestreams
 
Introduction to rust: a low-level language with high-level abstractions
Introduction to rust: a low-level language with high-level abstractionsIntroduction to rust: a low-level language with high-level abstractions
Introduction to rust: a low-level language with high-level abstractions
 
Performance optimisation with GraphQL
Performance optimisation with GraphQLPerformance optimisation with GraphQL
Performance optimisation with GraphQL
 
Introduction to GraphQL at API days
Introduction to GraphQL at API daysIntroduction to GraphQL at API days
Introduction to GraphQL at API days
 
Introduction to type classes in Scala
Introduction to type classes in ScalaIntroduction to type classes in Scala
Introduction to type classes in Scala
 
Compile time dependency injection in Play 2.4 with macwire
Compile time dependency injection in Play 2.4 with macwireCompile time dependency injection in Play 2.4 with macwire
Compile time dependency injection in Play 2.4 with macwire
 
Structure your Play application with the cake pattern (and test it)
Structure your Play application with the cake pattern (and test it)Structure your Play application with the cake pattern (and test it)
Structure your Play application with the cake pattern (and test it)
 

Dernier

Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Dernier (20)

Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 

Bringing a public GraphQL API from beta to production ready

  • 1. Bringing a public GraphQL API from beta to production ready at scale Yann Simon
  • 2. What is commercetools commercetools API /products /carts … merchant center Single page app Mobile app cloud functions cloud queues Server Web / app
  • 4. 2015 • July 2015: Facebook published the first draft of the GraphQL specification • October 2015: first experimental GraphQL support at commercetools
  • 5. 2015 - 2020 • from 2018, more & more GraphQL traffic
  • 7. What happened? • Scaling up • operation • development of GraphQL API (speed, quality) • performances
  • 9. Protection against complex queries { products { results { id version } } } needs more resources to run { products { results { id version productType { name } } } } fetch the productType
  • 10. Protection against malicious queries • Query complexity analysis based on schema and resolution strategies • Too complex queries are blocked • more info: • https://www.apollographql.com/blog/securing-your-graphql-api-from- malicious-queries-16130a324a6b/ • https://sangria-graphql.github.io/learn/#protection-against-malicious- queries
  • 11. Add info to HTTP log entries method path status code GET /products 200 POST /carts 201 GET /reviews/79323 404 DELETE /product-discounts/47393 500
  • 12. Add info to HTTP log entries method path status code POST /graphql 200 POST /graphql 200 POST /graphql 200 POST /graphql 200 operation type top level fields complexity number of errors Query products, category 650 0 Mutation cart 140 0 Query review 340 0 Mutation productDiscount 500 1
  • 14. Slow logs • log slow queries
 
 • ‼ do not log sensitive data ‼
  • 15. Scaling up operations • protection against malicious queries • more info to http logs • metrics • slow logs • confidence in operating a GraphQL API at scale
  • 16. Scaling up GraphQL API development
  • 17. Internal usage • Internal applications are using the GraphQL API
 (merchant center, demo shop) • shorter feedback loops • improve API design • Frontend and Backend working together
  • 18. API consistency - schema validations • General conventions for API consistency • Internal validations based on the schema [ERROR] Caused by: sangria.schema.SchemaValidationException: Schema does not pass validation. Violations: [ERROR] Output object 'Category' contains a localized string field named 'name' which does not follow the 'xxx' !-> String + 'xxxAllLocales' !-> List(LocalizedString) naming convention. [ERROR] at sangria.schema.SchemaValidationRule$.validateWithException(SchemaValidationRule.scala:42) [ERROR] at sangria.schema.Schema.<init>(Schema.scala:939)
  • 19. Automation of GraphQL Schema • Our REST API is following a CQRS architecture • different models for queries and mutations • Based on this model, generate GraphQL schema • Use schema introspection to test what is exposed
  • 20. Automation of API release notes • Production schema !== in development schema • Based on the differences, generate markdown file for public release notes
  • 22. Scaling up API development • Faster feedback loops • internal usage • Faster development • generating GraphQL types from REST API models • schema validations for API consistency • public release notes • Using deprecations to evolve • Graphql coverage is almost complete
  • 24. more tools for external developers • Expose query complexity as HTTP header
 https://docs.commercetools.com/api/graphql#query-complexity • Profiling
  • 25. query optimization Client Server Database Optimize payload Servers to servers Migrating our Apple WatchOS Commerce App to GraphQL
  • 26. query optimization Client Server Database Optimize query
 Do not select all fields Performance optimization (GraphQL meetup in Berlin)
  • 28. Scaling up performances • Give tools for users of the API • Optimize database queries based on GraphQL query • Inspect live servers • Continuous process
  • 29. Evolving a public Graph API from experimental to production ready needs investments in different areas
  • 34. Being production ready for more GraphQL traffic