SlideShare a Scribd company logo
Connecting the Dots
Kong for GraphQL Endpoints
Julien Bataillé
Software Engineer / Rakuten, Inc.
Rakuten, Inc.
How to manage GraphQL
APIs with Kong?
Agenda
• Quick introduction to GraphQL
• Differences between REST and GraphQL
• API Management for GraphQL
• Kong Plugins (demo)
• Developed by Facebook in 2012 / publicly released in 2015 / GraphQL Foundation in 2018
• Server and Client implementations are available for major languages (JS, Java, Python, C#...)
• Supports reading (query), writing (mutation) and subscribing to data changes (subscriptions)
• Solves the Over-Fetching and Under-Fetching problems
(Credits: https://graphql.org/)
A familiar use case: Kong Admin
Data Fetching with REST
HTTP GET /services
{
"next": null,
"data": [
{
"host": "10.0.2.2",
"created_at": 1560781137,
"connect_timeout": 60000,
"id": "3692da97-e066-46e6-9739-3da47cfe4abd",
"protocol": "http",
"name": "starwars-server",
"read_timeout": 60000,
"port": 8080,
"path": "/graphql",
"updated_at": 1561016983,
"retries": 5,
"write_timeout": 60000,
"tags": null
},
{
"host": "mockbin.org",
"created_at": 1560797940,
"connect_timeout": 60000,
"id": "81c4c6b5-746a-4421-ad0d-cddc0aa3ed87",
"protocol": "http",
"name": "mockbin",
"read_timeout": 60000,
"port": 80,
"path": "/request",
"updated_at": 1561017861,
"retries": 5,
"write_timeout": 60000,
"tags": null
}
]
}
HTTP GET /services/{service-id}/plugins x2
{
"next": null,
"data": [
{
"created_at": 1560860735,
"config": {
"block_introspection_queries": false
},
"id": "e0fcaa8b-167f-4f62-bf22-43dae04e91bf",
"service": {
"id": "3692da97-e066-46e6-9739-3da47cfe4abd"
},
"name": "graphql-operation-whitelist",
"protocols": [
"http",
"https"
],
"enabled": true,
"run_on": "first",
"consumer": null,
"route": null,
"tags": null
}
]
}
Data Fetching with REST vs GraphQL
query {
services {
name
host
created_at
plugins {
name
}
}
}
HTTP POST /kong-graphql-admin
HTTP GET /services
{
"next": null,
"data": [
{
"host": "10.0.2.2",
"created_at": 1560781137,
"connect_timeout": 60000,
"id": "3692da97-e066-46e6-9739-3da47cfe4abd",
"protocol": "http",
"name": "starwars-server",
"read_timeout": 60000,
"port": 8080,
"path": "/graphql",
"updated_at": 1561016983,
"retries": 5,
"write_timeout": 60000,
"tags": null
},
{
"host": "mockbin.org",
"created_at": 1560797940,
"connect_timeout": 60000,
"id": "81c4c6b5-746a-4421-ad0d-cddc0aa3ed87",
"protocol": "http",
"name": "mockbin",
"read_timeout": 60000,
"port": 80,
"path": "/request",
"updated_at": 1561017861,
"retries": 5,
"write_timeout": 60000,
"tags": null
}
]
}
HTTP GET /services/{service-id}/plugins x2
{
"next": null,
"data": [
{
"created_at": 1560860735,
"config": {
"block_introspection_queries": false
},
"id": "e0fcaa8b-167f-4f62-bf22-43dae04e91bf",
"service": {
"id": "3692da97-e066-46e6-9739-3da47cfe4abd"
},
"name": "graphql-operation-whitelist",
"protocols": [
"http",
"https"
],
"enabled": true,
"run_on": "first",
"consumer": null,
"route": null,
"tags": null
}
]
}
Data Fetching with REST vs GraphQL
query {
services {
name
host
created_at
plugins {
name
}
}
}
HTTP POST /kong-graphql-admin
{
"data": {
"services": [
{
"name": "starwars-server",
"host": "10.0.2.2",
"plugins": [
{
"name": "graphql-operation-whitelist"
}
],
"created_at": 1560781137
},
{
"name": "mockbin",
"host": "mockbin.org",
"plugins": [
{
"name": "basic-auth"
}
],
"created_at": 1560797940
}
]
HTTP GET /services
{
"next": null,
"data": [
{
"host": "10.0.2.2",
"created_at": 1560781137,
"connect_timeout": 60000,
"id": "3692da97-e066-46e6-9739-3da47cfe4abd",
"protocol": "http",
"name": "starwars-server",
"read_timeout": 60000,
"port": 8080,
"path": "/graphql",
"updated_at": 1561016983,
"retries": 5,
"write_timeout": 60000,
"tags": null
},
{
"host": "mockbin.org",
"created_at": 1560797940,
"connect_timeout": 60000,
"id": "81c4c6b5-746a-4421-ad0d-cddc0aa3ed87",
"protocol": "http",
"name": "mockbin",
"read_timeout": 60000,
"port": 80,
"path": "/request",
"updated_at": 1561017861,
"retries": 5,
"write_timeout": 60000,
"tags": null
}
]
}
HTTP GET /services/{service-id}/plugins x2
{
"next": null,
"data": [
{
"created_at": 1560860735,
"config": {
"block_introspection_queries": false
},
"id": "e0fcaa8b-167f-4f62-bf22-43dae04e91bf",
"service": {
"id": "3692da97-e066-46e6-9739-3da47cfe4abd"
},
"name": "graphql-operation-whitelist",
"protocols": [
"http",
"https"
],
"enabled": true,
"run_on": "first",
"consumer": null,
"route": null,
"tags": null
}
]
}
API Management with REST vs GraphQL
• API has many endpoints
• Resource selection is defined in route
• HTTP verbs define the operation
(GET, POST, DELETE...)
REST
• API has a single endpoint
• Resource selection is defined in body
• HTTP POST for every operations
(query or mutation defined in request body)
GraphQL
To manage GraphQL Endpoints, we have to look into the query
and extract some characteristics to implement policies.
Query characteristics examples
Nesting
Measure the nesting level of a query.
Query Cost Analysis
Count the amount of resources requested by a query.
Query whitelisting
Verify the query belongs to a group of authorized queries.
Query characteristics examples
Nesting
Measure the nesting level of a query.
Query Cost Analysis
Count the amount of resources requested by a query.
Query whitelisting
Verify the query belongs to a group of authorized queries.
50 = 50 repositories
+
50 x 10 = 500 repository issues
= 550 total nodes
Query characteristics examples
Nesting
Measure the nesting level of a query.
Query Cost Analysis
Count the amount of resources requested by a query.
Query whitelisting
Verify the query belongs to a group of authorized queries.
Existing solutions are language-specific libraries
API - 1
(JS)
Nesting Limit
Node Count Limit
Query Whitelisting
API - 2
(Java)
Nesting Limit
Node Count Limit
API - 3
(Python)
API - 1
(JS)
API - 2
(Java)
API - 3
(Python)
Kong
Plugins: Nesting Limit, Node Count Limit,
Query Whitelisting...
 Non-intrusive: no code or configuration change on your
GraphQL server.
 Language-agnostic: same features and performance
for all GraphQL implementations .
Two proof-of-concept Kong plugins developed at Rakuten
1. Depth Limit
Limit the complexity of GraphQL queries based on their depth.
https://github.com/rakutentech/kong-plugin-graphql-depth-limit
2. Operation Whitelist
Whitelist operations that your consumers can send to your GraphQL server.
https://github.com/rakutentech/kong-plugin-graphql-operation-whitelist
Operation Whitelist Plugin
Requirements
 Queries and Mutations blocked if not whitelisted
 Equivalent operations represented as a single entry
PDK Features Usage
 Storing/Caching Custom Entities
 Admin API Extension to manage the Whitelist
Client UpstreamKong
Query
Parsing
Signature
Generation
Signature
Hashing
Whitelist
Check
DEMO
Credits and references
• Securing Your GraphQL API from Malicious Queries (Apollo)
https://blog.apollographql.com/securing-your-graphql-api-from-malicious-queries-16130a324a6b
• GraphQL API Management (IBM)
https://www.ibm.com/blogs/research/2019/02/graphql-api-management/
• GraphQL Lua (@bjornbytes)
https://github.com/bjornbytes/graphql-lua
Thank you
Conclusion and Next Steps
• Kong extensibility is a key factor, look into plugin and Admin API
• GraphQL is still relatively new, but it’s popular and we need to address the security aspect
• Load and Performance testing
• Hardening the code
• Merging all the plugins in a single one
• Implement a Query Cost Analysis Plugin
Connecting the Dots: Kong for GraphQL Endpoints

More Related Content

What's hot

Introduction to LLMs, Prompt Engineering fundamentals,
Introduction to LLMs, Prompt Engineering fundamentals,Introduction to LLMs, Prompt Engineering fundamentals,
Introduction to LLMs, Prompt Engineering fundamentals,
Gianfranco Di Pietro
 
HDFS Architecture
HDFS ArchitectureHDFS Architecture
HDFS Architecture
Jeff Hammerbacher
 
Big data and Hadoop
Big data and HadoopBig data and Hadoop
Big data and Hadoop
Rahul Agarwal
 
LLMs Bootcamp
LLMs BootcampLLMs Bootcamp
LLMs Bootcamp
Fiza987241
 
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....
Marcin Bielak
 
(Big) Data Serialization with Avro and Protobuf
(Big) Data Serialization with Avro and Protobuf(Big) Data Serialization with Avro and Protobuf
(Big) Data Serialization with Avro and Protobuf
Guido Schmutz
 
Large Language Models Bootcamp
Large Language Models BootcampLarge Language Models Bootcamp
Large Language Models Bootcamp
Data Science Dojo
 
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
Applitools
 
Airflow at lyft for Airflow summit 2020 conference
Airflow at lyft for Airflow summit 2020 conferenceAirflow at lyft for Airflow summit 2020 conference
Airflow at lyft for Airflow summit 2020 conference
Tao Feng
 
Chat bots and AI
Chat bots and AIChat bots and AI
Chat bots and AI
Geff Thomas
 
Mother of Language`s Langchain
Mother of Language`s LangchainMother of Language`s Langchain
Mother of Language`s Langchain
Jun-hang Lee
 
Conversational AI: What's New?
Conversational AI: What's New?Conversational AI: What's New?
Conversational AI: What's New?
Microsoft Tech Community
 
The Rise of the LLMs - How I Learned to Stop Worrying & Love the GPT!
The Rise of the LLMs - How I Learned to Stop Worrying & Love the GPT!The Rise of the LLMs - How I Learned to Stop Worrying & Love the GPT!
The Rise of the LLMs - How I Learned to Stop Worrying & Love the GPT!
taozen
 
Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
confluent
 
Build an LLM-powered application using LangChain.pdf
Build an LLM-powered application using LangChain.pdfBuild an LLM-powered application using LangChain.pdf
Build an LLM-powered application using LangChain.pdf
AnastasiaSteele10
 
ChatGPT and OpenAI.pdf
ChatGPT and OpenAI.pdfChatGPT and OpenAI.pdf
ChatGPT and OpenAI.pdf
Sonal Tiwari
 
Generative Models and ChatGPT
Generative Models and ChatGPTGenerative Models and ChatGPT
Generative Models and ChatGPT
Loic Merckel
 
Chatbot and Virtual AI Assistant Implementation in Natural Language Processing
Chatbot and Virtual AI Assistant Implementation in Natural Language Processing Chatbot and Virtual AI Assistant Implementation in Natural Language Processing
Chatbot and Virtual AI Assistant Implementation in Natural Language Processing
Shrutika Oswal
 
Generative-AI-in-enterprise-20230615.pdf
Generative-AI-in-enterprise-20230615.pdfGenerative-AI-in-enterprise-20230615.pdf
Generative-AI-in-enterprise-20230615.pdf
Liming Zhu
 
Behind the Scenes of ChatGPT.pptx
Behind the Scenes of ChatGPT.pptxBehind the Scenes of ChatGPT.pptx
Behind the Scenes of ChatGPT.pptx
fsxflyer789Productio
 

What's hot (20)

Introduction to LLMs, Prompt Engineering fundamentals,
Introduction to LLMs, Prompt Engineering fundamentals,Introduction to LLMs, Prompt Engineering fundamentals,
Introduction to LLMs, Prompt Engineering fundamentals,
 
HDFS Architecture
HDFS ArchitectureHDFS Architecture
HDFS Architecture
 
Big data and Hadoop
Big data and HadoopBig data and Hadoop
Big data and Hadoop
 
LLMs Bootcamp
LLMs BootcampLLMs Bootcamp
LLMs Bootcamp
 
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....
Internet of Things - protocols review (MeetUp Wireless & Networks, Poznań 21....
 
(Big) Data Serialization with Avro and Protobuf
(Big) Data Serialization with Avro and Protobuf(Big) Data Serialization with Avro and Protobuf
(Big) Data Serialization with Avro and Protobuf
 
Large Language Models Bootcamp
Large Language Models BootcampLarge Language Models Bootcamp
Large Language Models Bootcamp
 
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
 
Airflow at lyft for Airflow summit 2020 conference
Airflow at lyft for Airflow summit 2020 conferenceAirflow at lyft for Airflow summit 2020 conference
Airflow at lyft for Airflow summit 2020 conference
 
Chat bots and AI
Chat bots and AIChat bots and AI
Chat bots and AI
 
Mother of Language`s Langchain
Mother of Language`s LangchainMother of Language`s Langchain
Mother of Language`s Langchain
 
Conversational AI: What's New?
Conversational AI: What's New?Conversational AI: What's New?
Conversational AI: What's New?
 
The Rise of the LLMs - How I Learned to Stop Worrying & Love the GPT!
The Rise of the LLMs - How I Learned to Stop Worrying & Love the GPT!The Rise of the LLMs - How I Learned to Stop Worrying & Love the GPT!
The Rise of the LLMs - How I Learned to Stop Worrying & Love the GPT!
 
Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
 
Build an LLM-powered application using LangChain.pdf
Build an LLM-powered application using LangChain.pdfBuild an LLM-powered application using LangChain.pdf
Build an LLM-powered application using LangChain.pdf
 
ChatGPT and OpenAI.pdf
ChatGPT and OpenAI.pdfChatGPT and OpenAI.pdf
ChatGPT and OpenAI.pdf
 
Generative Models and ChatGPT
Generative Models and ChatGPTGenerative Models and ChatGPT
Generative Models and ChatGPT
 
Chatbot and Virtual AI Assistant Implementation in Natural Language Processing
Chatbot and Virtual AI Assistant Implementation in Natural Language Processing Chatbot and Virtual AI Assistant Implementation in Natural Language Processing
Chatbot and Virtual AI Assistant Implementation in Natural Language Processing
 
Generative-AI-in-enterprise-20230615.pdf
Generative-AI-in-enterprise-20230615.pdfGenerative-AI-in-enterprise-20230615.pdf
Generative-AI-in-enterprise-20230615.pdf
 
Behind the Scenes of ChatGPT.pptx
Behind the Scenes of ChatGPT.pptxBehind the Scenes of ChatGPT.pptx
Behind the Scenes of ChatGPT.pptx
 

Similar to Connecting the Dots: Kong for GraphQL Endpoints

Implementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCImplementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPC
Tim Burks
 
GraphQL across the stack: How everything fits together
GraphQL across the stack: How everything fits togetherGraphQL across the stack: How everything fits together
GraphQL across the stack: How everything fits together
Sashko Stubailo
 
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays
 
20170624 GraphQL Presentation
20170624 GraphQL Presentation20170624 GraphQL Presentation
20170624 GraphQL Presentation
Martin Heidegger
 
LF_APIStrat17_REST API Microversions
LF_APIStrat17_REST API Microversions LF_APIStrat17_REST API Microversions
LF_APIStrat17_REST API Microversions
LF_APIStrat
 
Introduction to CloudStack API
Introduction to CloudStack APIIntroduction to CloudStack API
Introduction to CloudStack API
Krunal Jain
 
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
François-Guillaume Ribreau
 
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...
apidays
 
GraphQL & Prisma from Scratch
GraphQL & Prisma from ScratchGraphQL & Prisma from Scratch
GraphQL & Prisma from Scratch
Nikolas Burk
 
Graphql usage
Graphql usageGraphql usage
Graphql usage
Valentin Buryakov
 
GTLAB Installation Tutorial for SciDAC 2009
GTLAB Installation Tutorial for SciDAC 2009GTLAB Installation Tutorial for SciDAC 2009
GTLAB Installation Tutorial for SciDAC 2009
marpierc
 
Easing offline web application development with GWT
Easing offline web application development with GWTEasing offline web application development with GWT
Easing offline web application development with GWT
Arnaud Tournier
 
VBA API for scriptDB primer
VBA API for scriptDB primerVBA API for scriptDB primer
VBA API for scriptDB primer
Bruce McPherson
 
Hannes end-of-the-router-tnc17
Hannes end-of-the-router-tnc17Hannes end-of-the-router-tnc17
Hannes end-of-the-router-tnc17
Hannes Gredler
 
The Big Picture and How to Get Started
The Big Picture and How to Get StartedThe Big Picture and How to Get Started
The Big Picture and How to Get Started
guest1af57e
 
OGCE Project Overview
OGCE Project OverviewOGCE Project Overview
OGCE Project Overview
marpierc
 
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
Rob Crowley
 
How easy (or hard) it is to monitor your graph ql service performance
How easy (or hard) it is to monitor your graph ql service performanceHow easy (or hard) it is to monitor your graph ql service performance
How easy (or hard) it is to monitor your graph ql service performance
Red Hat
 
Saving Money by Optimizing Your Cloud Add-On Infrastructure
Saving Money by Optimizing Your Cloud Add-On InfrastructureSaving Money by Optimizing Your Cloud Add-On Infrastructure
Saving Money by Optimizing Your Cloud Add-On Infrastructure
Atlassian
 
Gohan
GohanGohan
Gohan
Nachi Ueno
 

Similar to Connecting the Dots: Kong for GraphQL Endpoints (20)

Implementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCImplementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPC
 
GraphQL across the stack: How everything fits together
GraphQL across the stack: How everything fits togetherGraphQL across the stack: How everything fits together
GraphQL across the stack: How everything fits together
 
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
 
20170624 GraphQL Presentation
20170624 GraphQL Presentation20170624 GraphQL Presentation
20170624 GraphQL Presentation
 
LF_APIStrat17_REST API Microversions
LF_APIStrat17_REST API Microversions LF_APIStrat17_REST API Microversions
LF_APIStrat17_REST API Microversions
 
Introduction to CloudStack API
Introduction to CloudStack APIIntroduction to CloudStack API
Introduction to CloudStack API
 
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
 
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 & Prisma from Scratch
GraphQL & Prisma from ScratchGraphQL & Prisma from Scratch
GraphQL & Prisma from Scratch
 
Graphql usage
Graphql usageGraphql usage
Graphql usage
 
GTLAB Installation Tutorial for SciDAC 2009
GTLAB Installation Tutorial for SciDAC 2009GTLAB Installation Tutorial for SciDAC 2009
GTLAB Installation Tutorial for SciDAC 2009
 
Easing offline web application development with GWT
Easing offline web application development with GWTEasing offline web application development with GWT
Easing offline web application development with GWT
 
VBA API for scriptDB primer
VBA API for scriptDB primerVBA API for scriptDB primer
VBA API for scriptDB primer
 
Hannes end-of-the-router-tnc17
Hannes end-of-the-router-tnc17Hannes end-of-the-router-tnc17
Hannes end-of-the-router-tnc17
 
The Big Picture and How to Get Started
The Big Picture and How to Get StartedThe Big Picture and How to Get Started
The Big Picture and How to Get Started
 
OGCE Project Overview
OGCE Project OverviewOGCE Project Overview
OGCE Project Overview
 
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
 
How easy (or hard) it is to monitor your graph ql service performance
How easy (or hard) it is to monitor your graph ql service performanceHow easy (or hard) it is to monitor your graph ql service performance
How easy (or hard) it is to monitor your graph ql service performance
 
Saving Money by Optimizing Your Cloud Add-On Infrastructure
Saving Money by Optimizing Your Cloud Add-On InfrastructureSaving Money by Optimizing Your Cloud Add-On Infrastructure
Saving Money by Optimizing Your Cloud Add-On Infrastructure
 
Gohan
GohanGohan
Gohan
 

Recently uploaded

Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
ervikas4
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
Reetu63
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Paul Brebner
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
Karya Keeper
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
The Third Creative Media
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
Tier1 app
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
Marcin Chrost
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
ISH Technologies
 
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Peter Caitens
 
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLESINTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
anfaltahir1010
 
What’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete RoadmapWhat’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete Roadmap
Envertis Software Solutions
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
sjcobrien
 
Quarter 3 SLRP grade 9.. gshajsbhhaheabh
Quarter 3 SLRP grade 9.. gshajsbhhaheabhQuarter 3 SLRP grade 9.. gshajsbhhaheabh
Quarter 3 SLRP grade 9.. gshajsbhhaheabh
aisafed42
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
VALiNTRY360
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
gapen1
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
Maitrey Patel
 

Recently uploaded (20)

Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
 
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
 
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLESINTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
 
What’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete RoadmapWhat’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete Roadmap
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
 
Quarter 3 SLRP grade 9.. gshajsbhhaheabh
Quarter 3 SLRP grade 9.. gshajsbhhaheabhQuarter 3 SLRP grade 9.. gshajsbhhaheabh
Quarter 3 SLRP grade 9.. gshajsbhhaheabh
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
 

Connecting the Dots: Kong for GraphQL Endpoints

  • 1. Connecting the Dots Kong for GraphQL Endpoints Julien Bataillé Software Engineer / Rakuten, Inc.
  • 3. How to manage GraphQL APIs with Kong?
  • 4. Agenda • Quick introduction to GraphQL • Differences between REST and GraphQL • API Management for GraphQL • Kong Plugins (demo)
  • 5. • Developed by Facebook in 2012 / publicly released in 2015 / GraphQL Foundation in 2018 • Server and Client implementations are available for major languages (JS, Java, Python, C#...) • Supports reading (query), writing (mutation) and subscribing to data changes (subscriptions) • Solves the Over-Fetching and Under-Fetching problems (Credits: https://graphql.org/)
  • 6. A familiar use case: Kong Admin
  • 7. Data Fetching with REST HTTP GET /services { "next": null, "data": [ { "host": "10.0.2.2", "created_at": 1560781137, "connect_timeout": 60000, "id": "3692da97-e066-46e6-9739-3da47cfe4abd", "protocol": "http", "name": "starwars-server", "read_timeout": 60000, "port": 8080, "path": "/graphql", "updated_at": 1561016983, "retries": 5, "write_timeout": 60000, "tags": null }, { "host": "mockbin.org", "created_at": 1560797940, "connect_timeout": 60000, "id": "81c4c6b5-746a-4421-ad0d-cddc0aa3ed87", "protocol": "http", "name": "mockbin", "read_timeout": 60000, "port": 80, "path": "/request", "updated_at": 1561017861, "retries": 5, "write_timeout": 60000, "tags": null } ] } HTTP GET /services/{service-id}/plugins x2 { "next": null, "data": [ { "created_at": 1560860735, "config": { "block_introspection_queries": false }, "id": "e0fcaa8b-167f-4f62-bf22-43dae04e91bf", "service": { "id": "3692da97-e066-46e6-9739-3da47cfe4abd" }, "name": "graphql-operation-whitelist", "protocols": [ "http", "https" ], "enabled": true, "run_on": "first", "consumer": null, "route": null, "tags": null } ] }
  • 8. Data Fetching with REST vs GraphQL query { services { name host created_at plugins { name } } } HTTP POST /kong-graphql-admin HTTP GET /services { "next": null, "data": [ { "host": "10.0.2.2", "created_at": 1560781137, "connect_timeout": 60000, "id": "3692da97-e066-46e6-9739-3da47cfe4abd", "protocol": "http", "name": "starwars-server", "read_timeout": 60000, "port": 8080, "path": "/graphql", "updated_at": 1561016983, "retries": 5, "write_timeout": 60000, "tags": null }, { "host": "mockbin.org", "created_at": 1560797940, "connect_timeout": 60000, "id": "81c4c6b5-746a-4421-ad0d-cddc0aa3ed87", "protocol": "http", "name": "mockbin", "read_timeout": 60000, "port": 80, "path": "/request", "updated_at": 1561017861, "retries": 5, "write_timeout": 60000, "tags": null } ] } HTTP GET /services/{service-id}/plugins x2 { "next": null, "data": [ { "created_at": 1560860735, "config": { "block_introspection_queries": false }, "id": "e0fcaa8b-167f-4f62-bf22-43dae04e91bf", "service": { "id": "3692da97-e066-46e6-9739-3da47cfe4abd" }, "name": "graphql-operation-whitelist", "protocols": [ "http", "https" ], "enabled": true, "run_on": "first", "consumer": null, "route": null, "tags": null } ] }
  • 9. Data Fetching with REST vs GraphQL query { services { name host created_at plugins { name } } } HTTP POST /kong-graphql-admin { "data": { "services": [ { "name": "starwars-server", "host": "10.0.2.2", "plugins": [ { "name": "graphql-operation-whitelist" } ], "created_at": 1560781137 }, { "name": "mockbin", "host": "mockbin.org", "plugins": [ { "name": "basic-auth" } ], "created_at": 1560797940 } ] HTTP GET /services { "next": null, "data": [ { "host": "10.0.2.2", "created_at": 1560781137, "connect_timeout": 60000, "id": "3692da97-e066-46e6-9739-3da47cfe4abd", "protocol": "http", "name": "starwars-server", "read_timeout": 60000, "port": 8080, "path": "/graphql", "updated_at": 1561016983, "retries": 5, "write_timeout": 60000, "tags": null }, { "host": "mockbin.org", "created_at": 1560797940, "connect_timeout": 60000, "id": "81c4c6b5-746a-4421-ad0d-cddc0aa3ed87", "protocol": "http", "name": "mockbin", "read_timeout": 60000, "port": 80, "path": "/request", "updated_at": 1561017861, "retries": 5, "write_timeout": 60000, "tags": null } ] } HTTP GET /services/{service-id}/plugins x2 { "next": null, "data": [ { "created_at": 1560860735, "config": { "block_introspection_queries": false }, "id": "e0fcaa8b-167f-4f62-bf22-43dae04e91bf", "service": { "id": "3692da97-e066-46e6-9739-3da47cfe4abd" }, "name": "graphql-operation-whitelist", "protocols": [ "http", "https" ], "enabled": true, "run_on": "first", "consumer": null, "route": null, "tags": null } ] }
  • 10. API Management with REST vs GraphQL • API has many endpoints • Resource selection is defined in route • HTTP verbs define the operation (GET, POST, DELETE...) REST • API has a single endpoint • Resource selection is defined in body • HTTP POST for every operations (query or mutation defined in request body) GraphQL To manage GraphQL Endpoints, we have to look into the query and extract some characteristics to implement policies.
  • 11. Query characteristics examples Nesting Measure the nesting level of a query. Query Cost Analysis Count the amount of resources requested by a query. Query whitelisting Verify the query belongs to a group of authorized queries.
  • 12. Query characteristics examples Nesting Measure the nesting level of a query. Query Cost Analysis Count the amount of resources requested by a query. Query whitelisting Verify the query belongs to a group of authorized queries. 50 = 50 repositories + 50 x 10 = 500 repository issues = 550 total nodes
  • 13. Query characteristics examples Nesting Measure the nesting level of a query. Query Cost Analysis Count the amount of resources requested by a query. Query whitelisting Verify the query belongs to a group of authorized queries.
  • 14. Existing solutions are language-specific libraries API - 1 (JS) Nesting Limit Node Count Limit Query Whitelisting API - 2 (Java) Nesting Limit Node Count Limit API - 3 (Python) API - 1 (JS) API - 2 (Java) API - 3 (Python) Kong Plugins: Nesting Limit, Node Count Limit, Query Whitelisting...  Non-intrusive: no code or configuration change on your GraphQL server.  Language-agnostic: same features and performance for all GraphQL implementations .
  • 15. Two proof-of-concept Kong plugins developed at Rakuten 1. Depth Limit Limit the complexity of GraphQL queries based on their depth. https://github.com/rakutentech/kong-plugin-graphql-depth-limit 2. Operation Whitelist Whitelist operations that your consumers can send to your GraphQL server. https://github.com/rakutentech/kong-plugin-graphql-operation-whitelist
  • 16. Operation Whitelist Plugin Requirements  Queries and Mutations blocked if not whitelisted  Equivalent operations represented as a single entry PDK Features Usage  Storing/Caching Custom Entities  Admin API Extension to manage the Whitelist Client UpstreamKong Query Parsing Signature Generation Signature Hashing Whitelist Check
  • 17. DEMO
  • 18. Credits and references • Securing Your GraphQL API from Malicious Queries (Apollo) https://blog.apollographql.com/securing-your-graphql-api-from-malicious-queries-16130a324a6b • GraphQL API Management (IBM) https://www.ibm.com/blogs/research/2019/02/graphql-api-management/ • GraphQL Lua (@bjornbytes) https://github.com/bjornbytes/graphql-lua
  • 20. Conclusion and Next Steps • Kong extensibility is a key factor, look into plugin and Admin API • GraphQL is still relatively new, but it’s popular and we need to address the security aspect • Load and Performance testing • Hardening the code • Merging all the plugins in a single one • Implement a Query Cost Analysis Plugin

Editor's Notes

  1. Good afternoon everyone, I'm Julien Bataillé , I'm a software engineer at Rakuten and I work with a team in charge of developing and maintaining the API Gateway for our entire group of companies.
  2. If you attended the session this morning "Building the Next Era of Software" maybe you heard my colleague Alex talking about the challenges of providing Kong to such a large and diverse organization. Today, I'd like to talk about one particular use case that came to us earlier this year. We were talking with one of our largest team here in the US about getting onboard and expose their APIs through our shared instance of Kong. They were interested, Kong is a great product after all, but they raised one important question:
  3. how Kong can help to manage GraphQL APIs? And this is the question I'd like to try to answer with today’s presentation.
  4. this is the agenda for today’s talk. First, I will start with a very quick introduction to GraphQL. Then I will try to highlight the differences between REST and GraphQL and how it’s impacting the rules and policies we use to manage APIs. Finally, I will show you some examples of Kong plugins we developed with a live demo if we have enough time.
  5. But first, a few words about GraphQL. It’s a very popular alternative to REST for front end applications. Since it was open sourced by Facebook in 2015, adoption has been really strong and nowadays you can find both server and client implementations for almost every stacks. It allows the client to define the structure of the data required and the server will return exactly that and nothing else. This is why it’s often considered a great solution to solve the so-called Over-fetching and under-fetching problems. It’s doing much more than that but I’d like to insist on this point because I think this is one of the most relevant to today’s topic.
  6. So to illustrate this I’d like to take an example that is probably very familiar to today’s audience. The Kong Admin REST API. How many of you used or know about the Kong Admin API? So let’s say I want to display the list of services configured on my Kong cluster and in the same page I want to see the list of plugins activated on each service.
  7. To achieve this, I first need to call the services endpoints and it will return the name, host and creation time for each of my services. Notice that I also receive a lot of fields in the response that are not required to display this page to the user. This is Over-fetching: I get data in the server’s response that are useless to my application. But the plugins for each service are missing from this first response so I need to make another round trip to the server to get this additional piece of information. Not only one but 2 calls in this example because I need to display 2 serrvices. At least I can send those two last requests in parallel but in more complex scenarios it is sometime not even possible to do so. This I hope is a good example of under-fetching. Now let’s compare it to how we would achieve the same result with GraphQL:
  8. First on the client we would build a query that would contain only the information we need: name, host, creation time, plugins. On this plugins entity we specify only the fields we want, in this example the name of the plugin. We would POST this query inside the body of a HTTP request to the Kong GraphQL Admin API
  9. and the response would contain exactly the fields specified in the query. We get the all the information we need to display our page in a single round trip to the server. So from this example you can already notice a few differences between REST and GraphQL that will have an impact how we implement API Management policies.
  10. First, instead of many endpoints in a typical REST API we now have a single endpoint for GraphQL. The resource selection with REST is usually defined in the route or path of the request whereas with GraphQL this resource selection is specified by the operation sent in the body. With REST, we are used to conventions on the HTTP verb to define operations: GET, POST, PATCH, DELETE can be used to implement policies or restrictions on the API usage. For most common GraphQL implementations only POST operations are necessary. Finally, as we just saw in the previous example One GraphQL call can replace multiple REST calls. How do we implement Rate Limiting in this case, does it even make sense to use rate limiting? I hope a this point you will agree that to manage GraphQL endpoints, we have to look into the GraphQL operation to extract some characteristics about the query or mutation and use those characteristics to implement our API Management policies.
  11. To make things more concrete let me share a few examples of what we can look into. First we could measure the nesting of a query and impose some arbitrary limits to avoid this kind of recursive query.
  12. Next, we can measure the cost of a query by counting the number of entities required by the client. this example is from the Github GraphQL API: the client requested the 50 first repositories from an account and for each repository the first 10 issues for a total of 550 nodes. This is how Github implements rate limiting: instead of a number of 5,000 request per hour, they set a limit of points per hour. Each type of node costing an arbitrary number of points.
  13. Query whitelisting is another policy we can implement if we have the capability to compare GraphQL operations and determine when two operations are functionally equivalent or not. I will develop this one in just a moment.
  14. But first I want to mention that you will find libraries that implement the policies I just showed. Those are language specific solutions so it means you need to modify or reconfigure your GraphQL server to enable it. This is where I believe Kong brings a better alternative: as for REST APIs, we want to move the implementation to Kong plugins instead of each individual upstream API. It gives us the opportunity to enforce the same policies across all our GraphQL servers implemented in Javascript, Python or Java.
  15. In the past few months we implemented two Kong plugins at Rakuten to validate this approach: the first one is fairly basic and implements the Depth limit policy I talked about earlier. It allowed us to verify we could parse a GraphQL query in a Kong plugin. The second one is a little more complex and this is the one I’d like to demo today.
  16. There is no Open Source without a Community.