SlideShare a Scribd company logo
1 of 29
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Pop-up Loft
Introduction to Data Driven Apps with GraphQL
Speaker Name,
Speaker Title
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
App Data Challenges
Data requirements
vary across devices
and become harder
when multiple
users share data
Users want instant
access to data
Building scalable
data-driven apps
without learning
distributed systems
concepts is hard
Users want to
continue using
their apps even
with low or no
connectivity
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
App Data Requirements
Real-time
Collaboration
Offline Programming
Model with Sync
Get Only the
Data You Need
Fine-grained
Access Control
Flexible Database
Options
Share Schema between
Client and Server
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Option 1: HTTP or REST API
• Resources defined by “Endpoints”
• Client calls to many endpoints
• Uses HTTP as a transport
• Conceptually simple
• Tried and true
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Option 1: HTTP or REST API
Real-time
Collaboration
Offline Programming
Model with Sync
Get Only the
Data You Need
Fine-grained
Access Control
Flexible Database
Options
Share Schema between
Client and Server
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Option 2: GraphQL
GraphQL is a query language for APIs and a runtime
for fulfilling those queries with your existing data.
GraphQL provides a complete and understandable description
of the data in your API, gives clients the power to ask for
exactly what they need and nothing more, makes it easier to
evolve APIs over time, and enables powerful developer tools
graphql.org/learn
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
GraphQL is a query language for APIs…
• Resources defined by a GraphQL Schema
• Client sends query, server orchestrates data
• Mutiple transports (HTTP, MQTT, WebSockets)
• Efficient (Network Bandwidth, Dev Time)
• Self Documenting (Introspection w/ Tooling)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
GraphQL is a query language for APIs…
Queries read data
Mutations write data
Subscriptions are pushed data in real-time
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Option 2: GraphQL
Real-time
Collaboration
Offline Programming
Model with Sync
Get Only the
Data You Need
Fine-grained
Access Control
Flexible Database
Options
Share Schema between
Client and Server
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
GraphQL: Query Basics
There are 3 operation types:
• Query
• Mutation
• Subscription
Variables are optional. When using
variables, clients send a “variables” object
containing the values alongside the query.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
A runtime for fulfilling those queries…
• A GraphQL server takes a query and returns a response of
the exact same shape.
• Each field in the query selection set is “resolved” by a
server side function.
• GraphQL provides a standard contract allowing clients to
talk to any number of backend data stores.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
A runtime for fulfilling those queries…
query {
posts {
id
title
comments {
content
}
author {
name
}
}
}
Posts resolves by Elasticsearch
Comments resolved by DynamoDB
Author resolved by custom Lambda
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
A runtime for fulfilling those queries…
query {
posts {
id
title
comments {
content
}
author {
name
}
}
}
{
"data": {
"posts": [
{
"id": 1,
"title" "Intro to GraphQL",
"comments": [
{
"content": "I want GraphQL!"
}
],
"author": {
"name": "Awesome Developer"
}
}
]
}
}
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
GraphQL provides a description of your data…
• Define schema with schema definition language (SDL)
• Advanced types
– Object, Interface, Union, Enum, Input, Scalar
• Self documenting
• Code generation
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Selection sets
Selection sets specify what fields to
resolve and thus what data to return
Selection sets can be nested
arbitrarily
Fields that return a scalar or an enum
do not have selection sets
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Fragments
Fragments are a basic unit of
composition
Like a named, reusable selection set
but with a few extra features
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Directives
@skip & @include supported
by the specification but system
implementations can add their
own
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Schema Definition Language (SDL)
Concise way to define and document
GraphQL schemas
You can think of SDL as the Data
Definition Language (DDL) and the
query language as the Data
Manipulation Language (DML)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Scalars
Create scalar types with custom
validation, parsing, and serialization
Use Cases: email, timestamps, phone
numbers, any regex checked string
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Objects
Contain a set of fields each of which
is of a specific type
A very common building block
Root types (Query, Mutation,
Subscription) are also Object types
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Enumerations
Denotes a scalar that is of a
predetermined set of values
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Interfaces
Defines a common set of fields.
Object types implement interfaces.
Query with fragments
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Unions
A union says than an object is one of
a set of types.
Query with fragments
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Gives clients the power to ask for what they need…
• Each UI component has its own data requirements
• The same backend model can be viewed in different ways
• The network is precious
• The security boundary should be defined by the backend, not the UI
• A queryable API is a better solution than different endpoints per view
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Use case: Master-detail views
DetailMaster
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Makes it easier to evolve APIs over time…
• GraphQL requires that every request specify every field
• We know what is being used = we can deprecate with confidence
• Schema allows for marking fields as deprecated!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Powerful Developer Tools
• Optimized, caching and offline client libraries
• Introspection
• Code generation
• IDE integrations
• Data visualizations
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Demo: GraphQL In Action
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Pop-up Loft
aws.amazon.com/mobile
@AWSforMobile
Everything you need to connect
Your mobile app to the cloud

More Related Content

What's hot

Building your first GraphQL API with AWS AppSync
Building your first GraphQL API with AWS AppSyncBuilding your first GraphQL API with AWS AppSync
Building your first GraphQL API with AWS AppSyncAmazon Web Services
 
Introducing AWS Cloud9 - AWS Online Tech Talks
Introducing AWS Cloud9 - AWS Online Tech TalksIntroducing AWS Cloud9 - AWS Online Tech Talks
Introducing AWS Cloud9 - AWS Online Tech TalksAmazon Web Services
 
Building a Serverless AI Powered Twitter Bot: Collision 2018
Building a Serverless AI Powered Twitter Bot: Collision 2018Building a Serverless AI Powered Twitter Bot: Collision 2018
Building a Serverless AI Powered Twitter Bot: Collision 2018Amazon Web Services
 
Architecting an Open Data Lake for the Enterprise
 Architecting an Open Data Lake for the Enterprise  Architecting an Open Data Lake for the Enterprise
Architecting an Open Data Lake for the Enterprise Amazon Web Services
 
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...Amazon Web Services
 
Building Mobile Apps with AWS Amplify
Building Mobile Apps with AWS AmplifyBuilding Mobile Apps with AWS Amplify
Building Mobile Apps with AWS AmplifyAmazon Web Services
 
Build a Voice-Based Chatbot for Your Amazon Connect Contact Center
Build a Voice-Based Chatbot for Your Amazon Connect Contact CenterBuild a Voice-Based Chatbot for Your Amazon Connect Contact Center
Build a Voice-Based Chatbot for Your Amazon Connect Contact CenterAmazon Web Services
 
Build a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a RideBuild a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a RideAmazon Web Services
 
Build Cloud-Connected Apps in React Native for iOS & Android.pdf
Build Cloud-Connected Apps in React Native for iOS & Android.pdfBuild Cloud-Connected Apps in React Native for iOS & Android.pdf
Build Cloud-Connected Apps in React Native for iOS & Android.pdfAmazon Web Services
 
Tips and Tricks for Running Container Workloads on AWS
Tips and Tricks for Running Container Workloads on AWSTips and Tricks for Running Container Workloads on AWS
Tips and Tricks for Running Container Workloads on AWSAmazon Web Services
 
Dow Jones & Wall Street Journal's journey to manage traffic spikes while miti...
Dow Jones & Wall Street Journal's journey to manage traffic spikes while miti...Dow Jones & Wall Street Journal's journey to manage traffic spikes while miti...
Dow Jones & Wall Street Journal's journey to manage traffic spikes while miti...Amazon Web Services
 
Authentication and Identity with Amazon Cognito & Analytics with Amazon Pinpoint
Authentication and Identity with Amazon Cognito & Analytics with Amazon PinpointAuthentication and Identity with Amazon Cognito & Analytics with Amazon Pinpoint
Authentication and Identity with Amazon Cognito & Analytics with Amazon PinpointAmazon Web Services
 
SRV326 Build a Voice-based Chatbot for Your Amazon Connect Contact Center
 SRV326 Build a Voice-based Chatbot for Your Amazon Connect Contact Center SRV326 Build a Voice-based Chatbot for Your Amazon Connect Contact Center
SRV326 Build a Voice-based Chatbot for Your Amazon Connect Contact CenterAmazon Web Services
 
Build a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIBuild a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIAmazon Web Services
 
Introduction to AWS Amplify and the Amplify CLI Toolchain
Introduction to AWS Amplify and the Amplify CLI ToolchainIntroduction to AWS Amplify and the Amplify CLI Toolchain
Introduction to AWS Amplify and the Amplify CLI ToolchainAWS Germany
 
Simple Cloud with Amazon Lightsail
Simple Cloud with Amazon LightsailSimple Cloud with Amazon Lightsail
Simple Cloud with Amazon LightsailAmazon Web Services
 
Running Container on AWS - Builders Day Israel
Running Container on AWS - Builders Day IsraelRunning Container on AWS - Builders Day Israel
Running Container on AWS - Builders Day IsraelAmazon Web Services
 
Introduction to Mobile Development with AWS
Introduction to Mobile Development with AWSIntroduction to Mobile Development with AWS
Introduction to Mobile Development with AWSAmazon Web Services
 
Machine Learning: From Notebook to Production with Amazon Sagemaker
Machine Learning: From Notebook to Production with Amazon SagemakerMachine Learning: From Notebook to Production with Amazon Sagemaker
Machine Learning: From Notebook to Production with Amazon SagemakerAmazon Web Services
 
Preparing for AWS Certification/ Advanced Security Training
Preparing for AWS Certification/ Advanced Security TrainingPreparing for AWS Certification/ Advanced Security Training
Preparing for AWS Certification/ Advanced Security TrainingAmazon Web Services
 

What's hot (20)

Building your first GraphQL API with AWS AppSync
Building your first GraphQL API with AWS AppSyncBuilding your first GraphQL API with AWS AppSync
Building your first GraphQL API with AWS AppSync
 
Introducing AWS Cloud9 - AWS Online Tech Talks
Introducing AWS Cloud9 - AWS Online Tech TalksIntroducing AWS Cloud9 - AWS Online Tech Talks
Introducing AWS Cloud9 - AWS Online Tech Talks
 
Building a Serverless AI Powered Twitter Bot: Collision 2018
Building a Serverless AI Powered Twitter Bot: Collision 2018Building a Serverless AI Powered Twitter Bot: Collision 2018
Building a Serverless AI Powered Twitter Bot: Collision 2018
 
Architecting an Open Data Lake for the Enterprise
 Architecting an Open Data Lake for the Enterprise  Architecting an Open Data Lake for the Enterprise
Architecting an Open Data Lake for the Enterprise
 
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
 
Building Mobile Apps with AWS Amplify
Building Mobile Apps with AWS AmplifyBuilding Mobile Apps with AWS Amplify
Building Mobile Apps with AWS Amplify
 
Build a Voice-Based Chatbot for Your Amazon Connect Contact Center
Build a Voice-Based Chatbot for Your Amazon Connect Contact CenterBuild a Voice-Based Chatbot for Your Amazon Connect Contact Center
Build a Voice-Based Chatbot for Your Amazon Connect Contact Center
 
Build a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a RideBuild a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a Ride
 
Build Cloud-Connected Apps in React Native for iOS & Android.pdf
Build Cloud-Connected Apps in React Native for iOS & Android.pdfBuild Cloud-Connected Apps in React Native for iOS & Android.pdf
Build Cloud-Connected Apps in React Native for iOS & Android.pdf
 
Tips and Tricks for Running Container Workloads on AWS
Tips and Tricks for Running Container Workloads on AWSTips and Tricks for Running Container Workloads on AWS
Tips and Tricks for Running Container Workloads on AWS
 
Dow Jones & Wall Street Journal's journey to manage traffic spikes while miti...
Dow Jones & Wall Street Journal's journey to manage traffic spikes while miti...Dow Jones & Wall Street Journal's journey to manage traffic spikes while miti...
Dow Jones & Wall Street Journal's journey to manage traffic spikes while miti...
 
Authentication and Identity with Amazon Cognito & Analytics with Amazon Pinpoint
Authentication and Identity with Amazon Cognito & Analytics with Amazon PinpointAuthentication and Identity with Amazon Cognito & Analytics with Amazon Pinpoint
Authentication and Identity with Amazon Cognito & Analytics with Amazon Pinpoint
 
SRV326 Build a Voice-based Chatbot for Your Amazon Connect Contact Center
 SRV326 Build a Voice-based Chatbot for Your Amazon Connect Contact Center SRV326 Build a Voice-based Chatbot for Your Amazon Connect Contact Center
SRV326 Build a Voice-based Chatbot for Your Amazon Connect Contact Center
 
Build a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIBuild a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UI
 
Introduction to AWS Amplify and the Amplify CLI Toolchain
Introduction to AWS Amplify and the Amplify CLI ToolchainIntroduction to AWS Amplify and the Amplify CLI Toolchain
Introduction to AWS Amplify and the Amplify CLI Toolchain
 
Simple Cloud with Amazon Lightsail
Simple Cloud with Amazon LightsailSimple Cloud with Amazon Lightsail
Simple Cloud with Amazon Lightsail
 
Running Container on AWS - Builders Day Israel
Running Container on AWS - Builders Day IsraelRunning Container on AWS - Builders Day Israel
Running Container on AWS - Builders Day Israel
 
Introduction to Mobile Development with AWS
Introduction to Mobile Development with AWSIntroduction to Mobile Development with AWS
Introduction to Mobile Development with AWS
 
Machine Learning: From Notebook to Production with Amazon Sagemaker
Machine Learning: From Notebook to Production with Amazon SagemakerMachine Learning: From Notebook to Production with Amazon Sagemaker
Machine Learning: From Notebook to Production with Amazon Sagemaker
 
Preparing for AWS Certification/ Advanced Security Training
Preparing for AWS Certification/ Advanced Security TrainingPreparing for AWS Certification/ Advanced Security Training
Preparing for AWS Certification/ Advanced Security Training
 

Similar to Introduction to Data Driven Apps with GraphQL

Building Data Driven Apps with AWS: Collision 2018
Building Data Driven Apps with AWS: Collision 2018Building Data Driven Apps with AWS: Collision 2018
Building Data Driven Apps with AWS: Collision 2018Amazon Web Services
 
Building Data Driven Apps with AWS
Building Data Driven Apps with AWSBuilding Data Driven Apps with AWS
Building Data Driven Apps with AWSAmazon Web Services
 
NEW LAUNCH! Data Driven Apps with GraphQL: AWS AppSync Deep Dive - MBL402 - r...
NEW LAUNCH! Data Driven Apps with GraphQL: AWS AppSync Deep Dive - MBL402 - r...NEW LAUNCH! Data Driven Apps with GraphQL: AWS AppSync Deep Dive - MBL402 - r...
NEW LAUNCH! Data Driven Apps with GraphQL: AWS AppSync Deep Dive - MBL402 - r...Amazon Web Services
 
MBL204_Architecting Cost-Effective Mobile Backends for Scale, Security, and P...
MBL204_Architecting Cost-Effective Mobile Backends for Scale, Security, and P...MBL204_Architecting Cost-Effective Mobile Backends for Scale, Security, and P...
MBL204_Architecting Cost-Effective Mobile Backends for Scale, Security, and P...Amazon Web Services
 
Learn how to build serverless applications using the AWS Serverless Platform-...
Learn how to build serverless applications using the AWS Serverless Platform-...Learn how to build serverless applications using the AWS Serverless Platform-...
Learn how to build serverless applications using the AWS Serverless Platform-...Amazon Web Services
 
Real-time Analytics using Data from IoT Devices - AWS Online Tech Talks
Real-time Analytics using Data from IoT Devices - AWS Online Tech TalksReal-time Analytics using Data from IoT Devices - AWS Online Tech Talks
Real-time Analytics using Data from IoT Devices - AWS Online Tech TalksAmazon Web Services
 
DAT317_Migrating Databases and Data Warehouses to the Cloud
DAT317_Migrating Databases and Data Warehouses to the CloudDAT317_Migrating Databases and Data Warehouses to the Cloud
DAT317_Migrating Databases and Data Warehouses to the CloudAmazon Web Services
 
Managing a Database Migration Project Best Practices and Customer References.pdf
Managing a Database Migration Project Best Practices and Customer References.pdfManaging a Database Migration Project Best Practices and Customer References.pdf
Managing a Database Migration Project Best Practices and Customer References.pdfAmazon Web Services
 
Getting started with Serverless on AWS
Getting started with Serverless on AWSGetting started with Serverless on AWS
Getting started with Serverless on AWSAdrian Hornsby
 
AWS FSI Symposium 2017 NYC - Moving at the Speed of Serverless ft Broadridge
AWS FSI Symposium 2017 NYC - Moving at the Speed of Serverless ft BroadridgeAWS FSI Symposium 2017 NYC - Moving at the Speed of Serverless ft Broadridge
AWS FSI Symposium 2017 NYC - Moving at the Speed of Serverless ft BroadridgeAmazon Web Services
 
100 Billion Data Points With Lambda_AWSPSSummit_Singapore
100 Billion Data Points With Lambda_AWSPSSummit_Singapore100 Billion Data Points With Lambda_AWSPSSummit_Singapore
100 Billion Data Points With Lambda_AWSPSSummit_SingaporeAmazon Web Services
 
Deep learning systems model serving
Deep learning systems   model servingDeep learning systems   model serving
Deep learning systems model servingHagay Lupesko
 
How Nextdoor Built a Scalable, Serverless Data Pipeline for Billions of Event...
How Nextdoor Built a Scalable, Serverless Data Pipeline for Billions of Event...How Nextdoor Built a Scalable, Serverless Data Pipeline for Billions of Event...
How Nextdoor Built a Scalable, Serverless Data Pipeline for Billions of Event...Amazon Web Services
 
SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...
SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...
SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...Amazon Web Services
 
SRV307 Applying AWS Purpose-Built Database Strategy: Match Your Workload to ...
 SRV307 Applying AWS Purpose-Built Database Strategy: Match Your Workload to ... SRV307 Applying AWS Purpose-Built Database Strategy: Match Your Workload to ...
SRV307 Applying AWS Purpose-Built Database Strategy: Match Your Workload to ...Amazon Web Services
 
Introduction to AWS for Mobile Developers
Introduction to AWS for Mobile DevelopersIntroduction to AWS for Mobile Developers
Introduction to AWS for Mobile DevelopersAmazon Web Services
 

Similar to Introduction to Data Driven Apps with GraphQL (20)

Building Data Driven Apps with AWS: Collision 2018
Building Data Driven Apps with AWS: Collision 2018Building Data Driven Apps with AWS: Collision 2018
Building Data Driven Apps with AWS: Collision 2018
 
Building Data Driven Apps with AWS
Building Data Driven Apps with AWSBuilding Data Driven Apps with AWS
Building Data Driven Apps with AWS
 
NEW LAUNCH! Data Driven Apps with GraphQL: AWS AppSync Deep Dive - MBL402 - r...
NEW LAUNCH! Data Driven Apps with GraphQL: AWS AppSync Deep Dive - MBL402 - r...NEW LAUNCH! Data Driven Apps with GraphQL: AWS AppSync Deep Dive - MBL402 - r...
NEW LAUNCH! Data Driven Apps with GraphQL: AWS AppSync Deep Dive - MBL402 - r...
 
MBL204_Architecting Cost-Effective Mobile Backends for Scale, Security, and P...
MBL204_Architecting Cost-Effective Mobile Backends for Scale, Security, and P...MBL204_Architecting Cost-Effective Mobile Backends for Scale, Security, and P...
MBL204_Architecting Cost-Effective Mobile Backends for Scale, Security, and P...
 
Learn how to build serverless applications using the AWS Serverless Platform-...
Learn how to build serverless applications using the AWS Serverless Platform-...Learn how to build serverless applications using the AWS Serverless Platform-...
Learn how to build serverless applications using the AWS Serverless Platform-...
 
Real-time Analytics using Data from IoT Devices - AWS Online Tech Talks
Real-time Analytics using Data from IoT Devices - AWS Online Tech TalksReal-time Analytics using Data from IoT Devices - AWS Online Tech Talks
Real-time Analytics using Data from IoT Devices - AWS Online Tech Talks
 
DAT317_Migrating Databases and Data Warehouses to the Cloud
DAT317_Migrating Databases and Data Warehouses to the CloudDAT317_Migrating Databases and Data Warehouses to the Cloud
DAT317_Migrating Databases and Data Warehouses to the Cloud
 
Managing a Database Migration Project Best Practices and Customer References.pdf
Managing a Database Migration Project Best Practices and Customer References.pdfManaging a Database Migration Project Best Practices and Customer References.pdf
Managing a Database Migration Project Best Practices and Customer References.pdf
 
Getting started with Serverless on AWS
Getting started with Serverless on AWSGetting started with Serverless on AWS
Getting started with Serverless on AWS
 
AWS FSI Symposium 2017 NYC - Moving at the Speed of Serverless ft Broadridge
AWS FSI Symposium 2017 NYC - Moving at the Speed of Serverless ft BroadridgeAWS FSI Symposium 2017 NYC - Moving at the Speed of Serverless ft Broadridge
AWS FSI Symposium 2017 NYC - Moving at the Speed of Serverless ft Broadridge
 
100 Billion Data Points With Lambda_AWSPSSummit_Singapore
100 Billion Data Points With Lambda_AWSPSSummit_Singapore100 Billion Data Points With Lambda_AWSPSSummit_Singapore
100 Billion Data Points With Lambda_AWSPSSummit_Singapore
 
Deep learning systems model serving
Deep learning systems   model servingDeep learning systems   model serving
Deep learning systems model serving
 
How Nextdoor Built a Scalable, Serverless Data Pipeline for Billions of Event...
How Nextdoor Built a Scalable, Serverless Data Pipeline for Billions of Event...How Nextdoor Built a Scalable, Serverless Data Pipeline for Billions of Event...
How Nextdoor Built a Scalable, Serverless Data Pipeline for Billions of Event...
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
 
SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...
SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...
SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...
 
Migrating database to cloud
Migrating database to cloudMigrating database to cloud
Migrating database to cloud
 
Database Freedom | AWS Floor28
Database Freedom | AWS Floor28Database Freedom | AWS Floor28
Database Freedom | AWS Floor28
 
Serverless Developer Experience
Serverless Developer ExperienceServerless Developer Experience
Serverless Developer Experience
 
SRV307 Applying AWS Purpose-Built Database Strategy: Match Your Workload to ...
 SRV307 Applying AWS Purpose-Built Database Strategy: Match Your Workload to ... SRV307 Applying AWS Purpose-Built Database Strategy: Match Your Workload to ...
SRV307 Applying AWS Purpose-Built Database Strategy: Match Your Workload to ...
 
Introduction to AWS for Mobile Developers
Introduction to AWS for Mobile DevelopersIntroduction to AWS for Mobile Developers
Introduction to AWS for Mobile Developers
 

More from Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Introduction to Data Driven Apps with GraphQL

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Pop-up Loft Introduction to Data Driven Apps with GraphQL Speaker Name, Speaker Title
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved App Data Challenges Data requirements vary across devices and become harder when multiple users share data Users want instant access to data Building scalable data-driven apps without learning distributed systems concepts is hard Users want to continue using their apps even with low or no connectivity
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved App Data Requirements Real-time Collaboration Offline Programming Model with Sync Get Only the Data You Need Fine-grained Access Control Flexible Database Options Share Schema between Client and Server
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Option 1: HTTP or REST API • Resources defined by “Endpoints” • Client calls to many endpoints • Uses HTTP as a transport • Conceptually simple • Tried and true
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Option 1: HTTP or REST API Real-time Collaboration Offline Programming Model with Sync Get Only the Data You Need Fine-grained Access Control Flexible Database Options Share Schema between Client and Server
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Option 2: GraphQL GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools graphql.org/learn
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved GraphQL is a query language for APIs… • Resources defined by a GraphQL Schema • Client sends query, server orchestrates data • Mutiple transports (HTTP, MQTT, WebSockets) • Efficient (Network Bandwidth, Dev Time) • Self Documenting (Introspection w/ Tooling)
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved GraphQL is a query language for APIs… Queries read data Mutations write data Subscriptions are pushed data in real-time
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Option 2: GraphQL Real-time Collaboration Offline Programming Model with Sync Get Only the Data You Need Fine-grained Access Control Flexible Database Options Share Schema between Client and Server
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved GraphQL: Query Basics There are 3 operation types: • Query • Mutation • Subscription Variables are optional. When using variables, clients send a “variables” object containing the values alongside the query.
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved A runtime for fulfilling those queries… • A GraphQL server takes a query and returns a response of the exact same shape. • Each field in the query selection set is “resolved” by a server side function. • GraphQL provides a standard contract allowing clients to talk to any number of backend data stores.
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved A runtime for fulfilling those queries… query { posts { id title comments { content } author { name } } } Posts resolves by Elasticsearch Comments resolved by DynamoDB Author resolved by custom Lambda
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved A runtime for fulfilling those queries… query { posts { id title comments { content } author { name } } } { "data": { "posts": [ { "id": 1, "title" "Intro to GraphQL", "comments": [ { "content": "I want GraphQL!" } ], "author": { "name": "Awesome Developer" } } ] } }
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved GraphQL provides a description of your data… • Define schema with schema definition language (SDL) • Advanced types – Object, Interface, Union, Enum, Input, Scalar • Self documenting • Code generation
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Selection sets Selection sets specify what fields to resolve and thus what data to return Selection sets can be nested arbitrarily Fields that return a scalar or an enum do not have selection sets
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Fragments Fragments are a basic unit of composition Like a named, reusable selection set but with a few extra features
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Directives @skip & @include supported by the specification but system implementations can add their own
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Schema Definition Language (SDL) Concise way to define and document GraphQL schemas You can think of SDL as the Data Definition Language (DDL) and the query language as the Data Manipulation Language (DML)
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Scalars Create scalar types with custom validation, parsing, and serialization Use Cases: email, timestamps, phone numbers, any regex checked string
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Objects Contain a set of fields each of which is of a specific type A very common building block Root types (Query, Mutation, Subscription) are also Object types
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Enumerations Denotes a scalar that is of a predetermined set of values
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Interfaces Defines a common set of fields. Object types implement interfaces. Query with fragments
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Unions A union says than an object is one of a set of types. Query with fragments
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Gives clients the power to ask for what they need… • Each UI component has its own data requirements • The same backend model can be viewed in different ways • The network is precious • The security boundary should be defined by the backend, not the UI • A queryable API is a better solution than different endpoints per view
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Use case: Master-detail views DetailMaster
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Makes it easier to evolve APIs over time… • GraphQL requires that every request specify every field • We know what is being used = we can deprecate with confidence • Schema allows for marking fields as deprecated!
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Powerful Developer Tools • Optimized, caching and offline client libraries • Introspection • Code generation • IDE integrations • Data visualizations
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Demo: GraphQL In Action
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved Pop-up Loft aws.amazon.com/mobile @AWSforMobile Everything you need to connect Your mobile app to the cloud