SlideShare a Scribd company logo
Introduction to GraphQL & Serverless
Elijah Astley
Cloud Architect, API Talent
- Serverless Auckland
Tuesday, 20 March 2018
AKL
What is GraphQL?
AKLTuesday, 20 March 2018
Graph Databases
@cloud_elijah
https://www.youtube.com/watch?v=6o1Ezf6NZ_E
- Serverless Auckland
Volunteers?
AKLTuesday, 20 March 2018
What is GraphQL?
AKL
GraphQL API
GraphQL Client(s)
Tuesday, 20 March 2018
What is GraphQL?
GraphQL is a new
philosophy for building APIs
• It gives the client control
• Cuts down on network bandwidth
• Predictable results
• Multiple data sources
AKLTuesday, 20 March 2018
• Developed by Facebook in 2012
• Released to public in 2015 (OWFa)
• Technically still a working draft
• https://github.com/facebook/graphql
History
AKLTuesday, 20 March 2018
Definitions - Schema
AKLTuesday, 20 March 2018
Definitions - Query
AKLTuesday, 20 March 2018
Definitions - Mutation
AKLTuesday, 20 March 2018
Definitions - Subscription
AKLTuesday, 20 March 2018
GraphQL high level arch diagram
AKLTuesday, 20 March 2018
So how does GraphQL compare to REST?
AKL
https://www.apollographql.com/
Tuesday, 20 March 2018
Example with REST
AKL
GET /people/1
GET /films/2
Etc.
https://swapi.co/
Tuesday, 20 March 2018
Same example with GraphQL
AKLTuesday, 20 March 2018
How do they compare?
AKL
PROS
{REST}
• Human readable queries
• Easy to deal with multiple data sources
• Single roundtrip
• Adapts to different client requirements
• Self documenting
• Mature technology
• Lots of resources and conventions
• Client support
• Established patterns for auth/validation
• Great for simple applications
CONS
• Design patterns are still being established
• Caching is not trivial
• Unfamiliarity
• Multiple round trips
• Custom endpoints
• Documentation
Tuesday, 20 March 2018
What is GraphQL good for ?
AKL
Single Uniform API Decoupled from DB Schemas Re-wrapping REST
Tuesday, 20 March 2018
What is GraphQL good for ?
AKL
Typical GraphQL Developer
Tuesday, 20 March 2018
GraphQL Pitfalls
• Query Indefinite Depth
• Caching at a Network level
• Resource exhaustion
• File uploads
AKLTuesday, 20 March 2018
Serverless GraphQL
AKLTuesday, 20 March 2018
Example with a server
Serverless GraphQL
AKLTuesday, 20 March 2018
AWS Appsync
The AWS Way
AKLTuesday, 20 March 2018
The AWS way - Features
AKL
• Conflict detection & resolution
• Real-time subscriptions with the SDK
• Elasticsearch
• DynamoDB
• Lambda
 Queries
 Mutations
 Subscriptions
Tuesday, 20 March 2018
The AWS way - Auth
AKL
API Keys IAM Permissions Cognito User Pools
Tuesday, 20 March 2018
Lets setup an AppSync endpoint
AKLTuesday, 20 March 2018
Who is using GraphQL
AKLTuesday, 20 March 2018
Who is using AppSync
AKLTuesday, 20 March 2018
Resources
AKLTuesday, 20 March 2018
Helpful Tech & Repos
• https://github.com/facebook/graphql/
• https://www.apollographql.com/ & https://github.com/apollographql
• http://graphql.org/code/
eBooks
• GraphQL API Design by Matthias Biehl (https://api-university.com/books/graphql-api-design/)
Blogs
• https://hackernoon.com/running-a-scalable-reliable-graphql-endpoint-with-serverless-24c3bb5acb43
• https://docs.aws.amazon.com/appsync/latest/devguide/building-a-client-app.html
• https://blog.graph.cool/how-to-wrap-a-rest-api-with-graphql-8bf3fb17547d
• https://serverless.com/blog/make-serverless-graphql-api-using-lambda-dynamodb/
• https://labs.getninjas.com.br/pain-points-of-graphql-7e83ba5ddef7
@cloud_elijah
/in/elijahastley/

More Related Content

PPTX
DevOpsDays Amsterdam 2016 workshop
PPT
Add ons for stash
PPTX
Collab365 Global Summit Slides
PPTX
Visualizing large datasets with elasticsearch and kibana
PPTX
AWS Dev Day 2018
PDF
When Our Serverless Team Chooses Containers
PDF
Torkel Ödegaard (Creator of Grafana) - Grafana at #DOXLON
PPTX
Microsoft Graph – Subscription API
DevOpsDays Amsterdam 2016 workshop
Add ons for stash
Collab365 Global Summit Slides
Visualizing large datasets with elasticsearch and kibana
AWS Dev Day 2018
When Our Serverless Team Chooses Containers
Torkel Ödegaard (Creator of Grafana) - Grafana at #DOXLON
Microsoft Graph – Subscription API

What's hot (20)

PDF
2018-10-23 7 C - Using Graph API to read outlook mail for accounting - Hansam...
PPTX
One More State Management in Angular (NGRX vs. NGXS vs. Akita vs. RXJS)
PPTX
Quix presto ide, presto summit IL
PPTX
Pracital application logging and monitoring
PDF
Real Time Serverless Polling App
PDF
Bringing a public GraphQL API from beta to production ready
PDF
Lambda architecture
PDF
Serious Application Development In Serverless
PPTX
Data analytics at a petabyte scale final
PPTX
KliqMap for Esri: Actionable Location Analytics
PDF
Aws slide
PPTX
KliqPlan Overview
PPTX
KliqObjects Overview
PDF
GraphQL API on a Serverless Environment
PDF
Lessons Learned: Spring Cloud -> Docker -> Kubernetes
PPTX
AWS Finland meetup 2018 August
PDF
Productionize spark structured streaming
PDF
Serverless GraphQL @ServerlessConf New York
PDF
Howtomakeyourown gi sdashboard
PDF
Operating Elasticsearch in Kubernetes - microXchg Berlin 2019
2018-10-23 7 C - Using Graph API to read outlook mail for accounting - Hansam...
One More State Management in Angular (NGRX vs. NGXS vs. Akita vs. RXJS)
Quix presto ide, presto summit IL
Pracital application logging and monitoring
Real Time Serverless Polling App
Bringing a public GraphQL API from beta to production ready
Lambda architecture
Serious Application Development In Serverless
Data analytics at a petabyte scale final
KliqMap for Esri: Actionable Location Analytics
Aws slide
KliqPlan Overview
KliqObjects Overview
GraphQL API on a Serverless Environment
Lessons Learned: Spring Cloud -> Docker -> Kubernetes
AWS Finland meetup 2018 August
Productionize spark structured streaming
Serverless GraphQL @ServerlessConf New York
Howtomakeyourown gi sdashboard
Operating Elasticsearch in Kubernetes - microXchg Berlin 2019
Ad

Similar to Introduction to GraphQL & Serverless (20)

PDF
Graphql
PDF
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...
PDF
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
PPTX
GraphQL - Missing Link In REST
PDF
GraphQL over REST at Reactathon 2018
PDF
DEVOXX UK 2018 - GraphQL as an alternative approach to REST
PDF
GraphQL Meetup Bangkok 3.0
PPTX
Introduction to GraphQL
PDF
GraphQL for Native Apps
PDF
GraphQL in Ruby on Rails - basics
PDF
Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...
PDF
GraphQL
PDF
GraphQL in an Age of REST
PPTX
Introduction to graphQL
PDF
Getting started with GraphQL
PDF
All you need to know about GraphQL.pdf
PPTX
Introduction to Graph QL
PPTX
GraphQL - an elegant weapon... for more civilized age
PDF
codersera_com (1).pdf
PPTX
GraphQL.pptx
Graphql
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
GraphQL - Missing Link In REST
GraphQL over REST at Reactathon 2018
DEVOXX UK 2018 - GraphQL as an alternative approach to REST
GraphQL Meetup Bangkok 3.0
Introduction to GraphQL
GraphQL for Native Apps
GraphQL in Ruby on Rails - basics
Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...
GraphQL
GraphQL in an Age of REST
Introduction to graphQL
Getting started with GraphQL
All you need to know about GraphQL.pdf
Introduction to Graph QL
GraphQL - an elegant weapon... for more civilized age
codersera_com (1).pdf
GraphQL.pptx
Ad

Recently uploaded (20)

PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Empathic Computing: Creating Shared Understanding
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Cloud computing and distributed systems.
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Encapsulation theory and applications.pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
A Presentation on Artificial Intelligence
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Unlocking AI with Model Context Protocol (MCP)
DOCX
The AUB Centre for AI in Media Proposal.docx
Encapsulation_ Review paper, used for researhc scholars
Mobile App Security Testing_ A Comprehensive Guide.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Empathic Computing: Creating Shared Understanding
Diabetes mellitus diagnosis method based random forest with bat algorithm
Dropbox Q2 2025 Financial Results & Investor Presentation
Cloud computing and distributed systems.
MYSQL Presentation for SQL database connectivity
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Encapsulation theory and applications.pdf
cuic standard and advanced reporting.pdf
A Presentation on Artificial Intelligence
Understanding_Digital_Forensics_Presentation.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Unlocking AI with Model Context Protocol (MCP)
The AUB Centre for AI in Media Proposal.docx

Introduction to GraphQL & Serverless

  • 1. Introduction to GraphQL & Serverless Elijah Astley Cloud Architect, API Talent - Serverless Auckland Tuesday, 20 March 2018 AKL
  • 4. What is GraphQL? AKL GraphQL API GraphQL Client(s) Tuesday, 20 March 2018
  • 5. What is GraphQL? GraphQL is a new philosophy for building APIs • It gives the client control • Cuts down on network bandwidth • Predictable results • Multiple data sources AKLTuesday, 20 March 2018
  • 6. • Developed by Facebook in 2012 • Released to public in 2015 (OWFa) • Technically still a working draft • https://github.com/facebook/graphql History AKLTuesday, 20 March 2018
  • 11. GraphQL high level arch diagram AKLTuesday, 20 March 2018
  • 12. So how does GraphQL compare to REST? AKL https://www.apollographql.com/ Tuesday, 20 March 2018
  • 13. Example with REST AKL GET /people/1 GET /films/2 Etc. https://swapi.co/ Tuesday, 20 March 2018
  • 14. Same example with GraphQL AKLTuesday, 20 March 2018
  • 15. How do they compare? AKL PROS {REST} • Human readable queries • Easy to deal with multiple data sources • Single roundtrip • Adapts to different client requirements • Self documenting • Mature technology • Lots of resources and conventions • Client support • Established patterns for auth/validation • Great for simple applications CONS • Design patterns are still being established • Caching is not trivial • Unfamiliarity • Multiple round trips • Custom endpoints • Documentation Tuesday, 20 March 2018
  • 16. What is GraphQL good for ? AKL Single Uniform API Decoupled from DB Schemas Re-wrapping REST Tuesday, 20 March 2018
  • 17. What is GraphQL good for ? AKL Typical GraphQL Developer Tuesday, 20 March 2018
  • 18. GraphQL Pitfalls • Query Indefinite Depth • Caching at a Network level • Resource exhaustion • File uploads AKLTuesday, 20 March 2018
  • 19. Serverless GraphQL AKLTuesday, 20 March 2018 Example with a server
  • 21. AWS Appsync The AWS Way AKLTuesday, 20 March 2018
  • 22. The AWS way - Features AKL • Conflict detection & resolution • Real-time subscriptions with the SDK • Elasticsearch • DynamoDB • Lambda  Queries  Mutations  Subscriptions Tuesday, 20 March 2018
  • 23. The AWS way - Auth AKL API Keys IAM Permissions Cognito User Pools Tuesday, 20 March 2018
  • 24. Lets setup an AppSync endpoint AKLTuesday, 20 March 2018
  • 25. Who is using GraphQL AKLTuesday, 20 March 2018
  • 26. Who is using AppSync AKLTuesday, 20 March 2018
  • 27. Resources AKLTuesday, 20 March 2018 Helpful Tech & Repos • https://github.com/facebook/graphql/ • https://www.apollographql.com/ & https://github.com/apollographql • http://graphql.org/code/ eBooks • GraphQL API Design by Matthias Biehl (https://api-university.com/books/graphql-api-design/) Blogs • https://hackernoon.com/running-a-scalable-reliable-graphql-endpoint-with-serverless-24c3bb5acb43 • https://docs.aws.amazon.com/appsync/latest/devguide/building-a-client-app.html • https://blog.graph.cool/how-to-wrap-a-rest-api-with-graphql-8bf3fb17547d • https://serverless.com/blog/make-serverless-graphql-api-using-lambda-dynamodb/ • https://labs.getninjas.com.br/pain-points-of-graphql-7e83ba5ddef7 @cloud_elijah /in/elijahastley/