SlideShare a Scribd company logo
1 of 58
Download to read offline
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Ten Tips and Tricks for Improving
Your GraphQL API with AWS
AppSync
Michael Paris
SDE
AWS
M O B 4 0 1
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
Schema design
Data design
Using AWS Lambda
Realtime data
Rapid development techniques
Offline data
CI / CD
Operations and monitoring
Testing APIs
Schema governance
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Everything in your API revolves around the schema
Here are a few tips to help build more resilient, evolvable schemas
Schema design
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Why? GraphQL type names are unique
You may proxy multiple services that expose similarly named data
Tip: Use long, descriptive names that adhere to a pattern
For example, you might use <Service><Type> and have names like AWSLambdaFunction
Use long, descriptive names
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Input and output patterns
Use a single input type per mutation field.
type Mutation {
# Use a single input field per mutation
createUserPost(input: CreateUserPostInput!): UserPost
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Input and output patterns (advanced)
type Mutation {
# Also consider explicit output types
createUserPost(input: CreateUserPostInput!): CreateUserPostOutput
}
# The query reference allows arbitrary reads after a write
type CreateUserPostOutput {
userPost: UserPost
query: Query
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Input and output patterns (advanced)
mutation ReadAfterWrite {
createUserPost(input: { title: “GraphQL @re:invent” }) {
userPost { title } # Returns the updated object
query { # Perform and arbitrary read after the update in the same req
userFeed {
title
}
}
}
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pagination patterns
Come up with a pagination pattern that works for you.
Think about your pagination requirements
Do you need a cursor per item?
What pagination related data do you need access to?
Do the edges in your graph contain data?
For example, is a friendship accepted or not
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
A simple pagination pattern
# Simple and effective
type UserPostConnection {
items: [UserPost]
nextToken: String
}
type User {
id: ID!
posts: UserPostConnection
}
type UserPost {
id: ID!
content: String
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
A simple pagination pattern
query SimplePaginatedQuery {
listObjects(limit: 10, nextToken: “…”) {
items {
id
title
}
nextToken # Finished when null
}
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
An advanced pagination pattern
# Connections wrap edges.
type UserFriendshipConnection {
edges: [UserFriendshipEdge]
pagination: PageInfo
}
# Edges wrap nodes.
type UserFriendshipEdge {
node: User
cursor: String
isAccepted: Boolean # data on the edge
}
# Wrapper for pagination related data.
type PageInfo {
hasNextPage: Boolean
hasPrevPage: Boolean
count: Int # extra page data
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
An advanced pagination pattern
query AdvancedPaginatedQuery {
listObjects(first: 10, after: “…”) { # or last: 10, before: “…”
edges {
node {
id
title
}
cursor
}
pageInfo { hasNextPage hasPrevPage } # Finished when one is false
}
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Use the best database for the job
Amazon DynamoDB - A great primary data store that scales
Amazon Elasticsearch Service (Amazon ES) - Rich search over large data sets
Amazon Relational Database Service (Amazon RDS) - Store transactional & relational data
Data design
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
GraphQL with Amazon DynamoDB
GraphQL Operation DynamoDB Operation
Mutation.create<Type> PutItem
Mutation.update<Type> UpdateItem
Mutation.delete<Type> DeleteItem
Query.get<Type> GetItem
Query.list<Type> Scan or Query
DynamoDB operations map really well to GraphQL
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Add relational capabilities to NoSQL
type User {
id: ID!
username: String!
tasks: [Task]
}
type Task {
id: ID!
title: String!
user: User
}
id username
1 Michael
2 Jay
3 Zach
id userId title
1 1 Write Slides
2 1 Prep Demo
3 3 Study For Exam
4 2 Review User Feedback
# Query the Task table’s GSI
# GetItem on the User Table
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Add relational capabilities to NoSQL
query GetUserAndOwnedPosts {
getUser(id: “1”) {
id
username
tasks {
id
title
}
}
}
id username
1 Michael
2 Jay
3 Zach
userId id title
1 1 Write Slides
1 2 Prep Demo
3 3 Study For Exam
2 4 Review User Feedback
GetItem
Query a table or index
where userId = $ctx.source.id
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
And the inverse
query GetUserAndOwnedPosts {
getTask(id: “1”) {
username
owner {
username
}
}
}
id username
1 Michael
2 Jay
3 Zach
id userId title
1 1 Write Slides
2 1 Prep Demo
3 3 Study For Exam
4 2 Review User Feedback
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Adding search to an API
Amazon DynamoDB
Low latency & high availability at any scale
Query patterns must be designed into the database structure
Amazon Elasticsearch Service
Rich DSL for full-text search and analytical queries
Often used as a secondary store for ad-hoc queries and analysis
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
DynamoDB + Amazon ES
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Elasticsearch Service resolvers
query SearchTasks {
searchTasksByTitle(
title: “Demo”
) {
items {
id
title
}
}
}
id userId title
1 1 Write Slides
2 1 Prep Demo
3 3 Study For Exam
4 2 Review User Feedback
GET /tasks/_search
{
"query": {
"match" : {
”title" : ”$ctx.args.title"
}
}
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Storing files
Amazon Simple Storage Service (Amazon S3)
A low latency, high-availability blob storage service
World-wide CDNs offer improved performance for mobile & web
Use AWS AppSync to store pointers to files in Amazon S3
Use S3 SDKs directly from the client for faster upload & download
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Storing files
type User {
id: ID!
username: String!
profilePicture: S3Object
}
type S3Object {
bucket: String
key: String
region: String
}
input S3ObjectInput {
bucket: String!
key: String!
region: String!
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Saving a file mutation CreateUser {
createUser(input: {
username: “janedoe”,
profilePicture: {
bucket: “unique-bucket-name”,
key: “path/to/file.png”,
region: “us-west-2” }
}) {
id
location { bucket key region }
}
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Reading files query GetUser {
getUser(id: “1”) {
id
location {
bucket
key
region
}
}
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Add business logic to an API without deploying servers
Connect any data source, internal or external
Tip: Use a standard event structure when resolving fields with Lambda
Leveraging AWS Lambda
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Use a standard event structure
type User {
id: ID!
username: String!
socialFriends: [SocialUser]
}
{
Arguments: $ctx.args,
TypeName: “User”,
FieldName: “socialFriends”,
Source: $ctx.source,
Identity: $ctx.identity
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Use a standard event structure
type Query {
pingLambda: Boolean
}
{
Arguments: $ctx.args,
TypeName: “Query”,
FieldName: “pingLambda”,
Source: $ctx.source,
Identity: $ctx.identity
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Should I use a single Lambda function everywhere?
type User {
id: ID!
username: String!
socialFriends: [SocialUser]
}
type Query {
pingLambda: Boolean
}
const =
=>
=>
const
const
return await
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Should I use many Lambda functions?
type User {
id: ID!
username: String!
socialFriends: [SocialUser]
}
type Query {
pingLambda: Boolean
}
// Implement a specific User.socialFriends function
// Implement a specific Query.pingLambda function
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Should I use a single Lambda function everywhere?
Using a single function
Can benefit from container warming
One code base for all of your resolvers can be easier to manage
Using many functions
Greater separation of concerns
Deploy resolvers independently
Split ownership of resolver code to many teams
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Real-time data
GraphQL subscriptions enable real-time communication
AWS AppSync doubles as a pub-sub broker via MQTT over WebSockets
Common question:
How to authorize subscriptions?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
GraphQL subscriptions
AWS AppSync subscriptions are
reactions to mutations.
Subscribe to any mutation without
additional configuration.
type Mutation {
publish: Message
}
type Subscription {
subscribe: Message
@aws_subscribe(mutations: [“publish”])
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Authorizing subscriptions
Naïve subscription implementations are subject to fan-out problems
If there are 1M connected clients, how do I authorize & route messages to each client?
1M connected clients * 1M messages = 1 trillion publishes
Two-part solution:
Authorize subscriptions at connect time.
Have the topic names themselves transparently encode comparisons.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Authorizing subscriptions
type Subscription {
onCreateMessage(chatRoomId: ID!): Message
@aws_subscribe(mutations: [“createMessage”])
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Subscription queries open connections
subscription AuthorizedSubscription {
onCreateMessage(chatRoomId: “1”) {
id
chatRoomId
content
}
}
chatRoomId
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Subscription queries open connections
subscription AuthorizedSubscription {
onCreateMessage(chatRoomId: “1”) {
…
}
}
subscription AuthorizedSubscription {
onCreateMessage(chatRoomId: “2”) {
…
}
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Mutations publish to topics
mutation CreateMessage {
createMessage(input: {…}) {
id
chatRoomId
content
}
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Authorizing subscriptions
Subscriptions are no longer subject to fan-out problems
Publishes are no longer dependent on the # of connected clients.
32 (max) topics * 1M messages = 32M (max) publishes.
This is now a manageable problem.
The solution (recap):
Authorize subscriptions at connect time.
Have the topic names themselves transparently encode any comparisons.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Rapid development techniques
AWS Amplify CLI generates infrastructure via AWS CloudFormation
Leverage the GraphQL transform to quickly build out data models
Use the AWS Amplify framework and codegen to build client apps
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Amplify CLI
$ amplify add auth
$ amplify add storage
$ amplify add api
$ amplify push
Add an Amazon Cognito User Pool
Create and secure an Amazon S3 bucket
Add an AWS AppSync API
Deploy via AWS CloudFormation
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Rapidly build scalable, data-driven applications
Leverages a new open-source project called the GraphQL Transform
Declaratively define your application’s data model using GraphQL SDL
Check your schema.graphql into git for easy version control
Transforms your data model into a CloudFormation document that implements it
Powered by GraphQL directives
Comes with a set of pre-built transformers
@model, @auth, @connection, @versioned, and @searchable
AWS Amplify + AWS AppSync
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The @model transformer
# schema.graphql
type Post @model {
id: ID!
title: String!
}
$ amplify add api
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
And voila!
AWS
Customer Account
Post Table
type Mutation {
createPost(...): Post
updatePost(...): Post
deletePost(...): Post
}
type Query {
getPost(...): Post
listPosts(...): Post
}
type Subscription {
onCreatePost(...): Post
onUpdatePost(...): Post
onDeletePost(...): Post
}
type Post {
id: ID!
title: String
createdAt: String
updatedAt: String
}
Schema Resolvers DataSources
AWS AppSync
createPost
updatePost
deletePost
getPost
listPosts
Mutation
Query
Post Table
DataSource
Post Table
ARN
IAM Role
ARN
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
@auth
type Post @model @auth(rules: [
{ allow: owner }
]) {
id: ID!
title: String!
owner: String
}
AWS Cloud
Amazon
DynamoDB
Post Table
type Mutation {
createPost(...): Post
updatePost(...): Post
deletePost(...): Post
}
type Query {
getPost(...): Post
listPosts(...): Post
}
type Subscription {
onCreatePost(...): Post
onUpdatePost(...): Post
onDeletePost(...): Post
}
Schema Resolvers DataSources
AWS AppSync
createPost
updatePost
deletePost
getPost
listPosts
Mutation
Query
Post Table
DataSource
Post
Table
ARN
IAM Role
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
@connection
type Post @model {
id: ID!
title: String!
comments: [Comment!]!
@connection(name: “PostComments”)
}
type Comment @model {
id: ID!
content: String!
post: Post
@connection(name: “PostComments”)
}
AWS Cloud
Amazon
DynamoDB
Post Table
type Mutation {
createPost(...): Post
updatePost(...): Post
deletePost(...): Post
createComment(...): Comment
updateComment(...): Comment
deleteComment(...): Comment
}
type Query {
getPost(...): Post
listPosts(...): Post
getComment(...): Comment
listComment(...): Comment
}
type Subscription {
onCreatePost(...): Post
onUpdatePost(...): Post
onDeletePost(...): Post
onCreateComment(...): Comment
onUpdateComment(...): Comment
onDeleteComment(...): Comment
}
Schema Resolvers DataSources
AWS AppSync
Mutation
Query
Post
DataSource
Post
Table
ARN
IAM Role
Comment
Table
Comment
DataSource
Post
Table
ARN
IAM Role
createComment
updateComment
deleteComment
deletePost
updatePost
createPost
getPost
listPosts
getComment
listComments
Post
comments
Comment
post
gsi-PostComments
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Querying with @connection
query GetPostAndComments {
getPost(id: ”1”) {
id
title
comments(limit: 10, nextToken: “...”) {
items {
id
content
}
nextToken
}
}
}
gsi-PostComments
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Amplify codegen
$ amplify add codegen
$ amplify codegen
# Generate queries & native types from your GraphQL API
# for iOS, Android, TypeScript, and Flow
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Offline and delta sync
Hydrate offline cache from main entity table
Only synchronize the “delta” when coming back online
Reconnection, exponential backoff, and retries handled by client
Base query, subscription, and delta query work together
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ID Name Title … timestamp expdate
1 Nadia Hello World 1541884315162 1541884320
2 Pancho I’m Sleepy 1541884359527 1541884364
3 Shaggy Running in the
park
1541884404015 1541884409
ID Name Title …
1 Nadia Hello World
2 Pancho I’m Sleepy
3 Shaggy Running in
the park
CreatePost1 (x) CreateDelta1 (x)
Pipeline resolver
createPost(input: CreatePostInput!): Post
GraphQL schema
mutation add{
createPost(Name:”Nadia” Title:“Hello World” ){
id
Name
Title
}
}
Delta TablePost Table
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ID Name Title … timestamp expdate
1 Nadia Hello World 1541884315162 1541884320
2 Pancho I’m Sleepy 1541884359527 1541884364
3 Shaggy Running in the
park
1541884404015 1541884409
ID Name Title …
1 Nadia Hello World
2 Pancho I’m Sleepy
3 Shaggy Running in the
park
Unit resolver
(Scan/Query, optional paginate, etc.)
listPosts : [Post]
GraphQL schema
Query list{
listPosts{
items {
id
Name
Title
}
}
}
listDeltas(lastSync: AWSTimestamp!) : [DeltaPost]
Delta TablePost Table
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ID Name Title … timestamp expdate
1 Nadia Hello World 1541884315162 1541884320
2 Pancho I’m Sleepy 1541884359527 1541884364
3 Shaggy Running in the
park
1541884404015 1541884409
ID Name Title …
1 Nadia Hello World
2 Pancho I’m Sleepy
3 Shaggy Running in the
park
Unit resolver
Conditional Scan/Query:
lastSync <= timestamp AND expdate > NOW
listPosts : [Post]
GraphQL schema
Query list{
listDeltas(lastSync:1541884330){
items {
id
Name
Title
}
}
}
listDeltas(lastSync: AWSTimestamp!) : [DeltaPost]
Delta TablePost Table
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
CI/CD with AWS Amplify Console
Simplified workflow for serverless web app development/deployment
Manage multiple environments based on feature branches in git
Atomic deployments via Lambda @ edge
Connect to GitHub, Bitbucket, GitLab, and AWS CodeCommit
Simple web hosting with custom domains
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Operations and monitoring
Enable Amazon CloudWatch logs in your AWS AppSync API
APIs come with CloudWatch metrics out of the box
Set alarms on 4xx, 5xx, and latency
Use the AWS Amplify Analytics category for powerful client monitoring
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Resolver auditing
Pipeline resolvers allow a resolver to interact with multiple data sources
A pipeline resolver is made up of many “functions” (not the same as Lambda functions)
Create an “Audit” function that reports information about a resolver
Attach this function to all the resolvers you want to audit
Create custom alerts, reports, metrics
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Testing APIs
Integration Tests
Trigger integration tests after AWS Amplify console deployments
Run tests in AWS Lambda and trigger using CloudWatch events
Canaries
Try out CloudWatch scheduled events + AWS Lambda
Generate test suites and fuzz APIs
Introspect your APIs schema to generate test suites automatically
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Schema governance
Centralized schema governance
Have one team manage the schema for the whole organization
Easier than decentralized governance but puts one team on the spot
Decentralized schema governance
AWS AppSync APIs currently require a single schema document
Build client tools to combine schemas from multiple teams into a single document
GraphQL type extensions allow teams to manage their own sub graph
Thank you!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Michael Paris
parismic@amazon.com
@mikeparisstuff
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.

More Related Content

What's hot

20190220 AWS Black Belt Online Seminar Amazon S3 / Glacier
20190220 AWS Black Belt Online Seminar Amazon S3 / Glacier20190220 AWS Black Belt Online Seminar Amazon S3 / Glacier
20190220 AWS Black Belt Online Seminar Amazon S3 / GlacierAmazon Web Services Japan
 
Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나Amazon Web Services Korea
 
20201028 AWS Black Belt Online Seminar Amazon CloudFront deep dive
20201028 AWS Black Belt Online Seminar Amazon CloudFront deep dive20201028 AWS Black Belt Online Seminar Amazon CloudFront deep dive
20201028 AWS Black Belt Online Seminar Amazon CloudFront deep diveAmazon Web Services Japan
 
AWS Black Belt Online Seminar AWS Key Management Service (KMS)
AWS Black Belt Online Seminar AWS Key Management Service (KMS) AWS Black Belt Online Seminar AWS Key Management Service (KMS)
AWS Black Belt Online Seminar AWS Key Management Service (KMS) Amazon Web Services Japan
 
20180724 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
20180724 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...20180724 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
20180724 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...Amazon Web Services Japan
 
AWS Black Belt Online Seminar 2016 AWS CloudFormation
AWS Black Belt Online Seminar 2016 AWS CloudFormationAWS Black Belt Online Seminar 2016 AWS CloudFormation
AWS Black Belt Online Seminar 2016 AWS CloudFormationAmazon Web Services Japan
 
20200826 AWS Black Belt Online Seminar AWS CloudFormation
20200826 AWS Black Belt Online Seminar AWS CloudFormation 20200826 AWS Black Belt Online Seminar AWS CloudFormation
20200826 AWS Black Belt Online Seminar AWS CloudFormation Amazon Web Services Japan
 
20190213 AWS Black Belt Online Seminar Amazon SageMaker Advanced Session
20190213 AWS Black Belt Online Seminar Amazon SageMaker Advanced Session20190213 AWS Black Belt Online Seminar Amazon SageMaker Advanced Session
20190213 AWS Black Belt Online Seminar Amazon SageMaker Advanced SessionAmazon Web Services Japan
 
AWS CLOUD 2018- AWS의 새로운 통합 머신러닝 플랫폼 서비스, Amazon SageMaker (김무현 솔루션즈 아키텍트)
AWS CLOUD 2018- AWS의 새로운 통합 머신러닝 플랫폼 서비스, Amazon SageMaker (김무현 솔루션즈 아키텍트)AWS CLOUD 2018- AWS의 새로운 통합 머신러닝 플랫폼 서비스, Amazon SageMaker (김무현 솔루션즈 아키텍트)
AWS CLOUD 2018- AWS의 새로운 통합 머신러닝 플랫폼 서비스, Amazon SageMaker (김무현 솔루션즈 아키텍트)Amazon Web Services Korea
 
Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Apigee | Google Cloud
 
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するためにAmazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するためにAmazon Web Services Japan
 
Presto ベースのマネージドサービス Amazon Athena
Presto ベースのマネージドサービス Amazon AthenaPresto ベースのマネージドサービス Amazon Athena
Presto ベースのマネージドサービス Amazon AthenaAmazon Web Services Japan
 
20190806 AWS Black Belt Online Seminar AWS Glue
20190806 AWS Black Belt Online Seminar AWS Glue20190806 AWS Black Belt Online Seminar AWS Glue
20190806 AWS Black Belt Online Seminar AWS GlueAmazon Web Services Japan
 
20190828 AWS Black Belt Online Seminar Amazon Aurora with PostgreSQL Compatib...
20190828 AWS Black Belt Online Seminar Amazon Aurora with PostgreSQL Compatib...20190828 AWS Black Belt Online Seminar Amazon Aurora with PostgreSQL Compatib...
20190828 AWS Black Belt Online Seminar Amazon Aurora with PostgreSQL Compatib...Amazon Web Services Japan
 
20190320 AWS Black Belt Online Seminar Amazon EBS
20190320 AWS Black Belt Online Seminar Amazon EBS20190320 AWS Black Belt Online Seminar Amazon EBS
20190320 AWS Black Belt Online Seminar Amazon EBSAmazon Web Services Japan
 
20200617 AWS Black Belt Online Seminar Amazon Athena
20200617 AWS Black Belt Online Seminar Amazon Athena20200617 AWS Black Belt Online Seminar Amazon Athena
20200617 AWS Black Belt Online Seminar Amazon AthenaAmazon Web Services Japan
 
AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築
AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築
AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築Amazon Web Services Japan
 
20190326 AWS Black Belt Online Seminar Amazon CloudWatch
20190326 AWS Black Belt Online Seminar Amazon CloudWatch20190326 AWS Black Belt Online Seminar Amazon CloudWatch
20190326 AWS Black Belt Online Seminar Amazon CloudWatchAmazon Web Services Japan
 

What's hot (20)

20190220 AWS Black Belt Online Seminar Amazon S3 / Glacier
20190220 AWS Black Belt Online Seminar Amazon S3 / Glacier20190220 AWS Black Belt Online Seminar Amazon S3 / Glacier
20190220 AWS Black Belt Online Seminar Amazon S3 / Glacier
 
Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 
20201028 AWS Black Belt Online Seminar Amazon CloudFront deep dive
20201028 AWS Black Belt Online Seminar Amazon CloudFront deep dive20201028 AWS Black Belt Online Seminar Amazon CloudFront deep dive
20201028 AWS Black Belt Online Seminar Amazon CloudFront deep dive
 
AWS Black Belt Online Seminar AWS Key Management Service (KMS)
AWS Black Belt Online Seminar AWS Key Management Service (KMS) AWS Black Belt Online Seminar AWS Key Management Service (KMS)
AWS Black Belt Online Seminar AWS Key Management Service (KMS)
 
20180724 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
20180724 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...20180724 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
20180724 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
 
AWS Black Belt Online Seminar 2016 AWS CloudFormation
AWS Black Belt Online Seminar 2016 AWS CloudFormationAWS Black Belt Online Seminar 2016 AWS CloudFormation
AWS Black Belt Online Seminar 2016 AWS CloudFormation
 
20200826 AWS Black Belt Online Seminar AWS CloudFormation
20200826 AWS Black Belt Online Seminar AWS CloudFormation 20200826 AWS Black Belt Online Seminar AWS CloudFormation
20200826 AWS Black Belt Online Seminar AWS CloudFormation
 
20190213 AWS Black Belt Online Seminar Amazon SageMaker Advanced Session
20190213 AWS Black Belt Online Seminar Amazon SageMaker Advanced Session20190213 AWS Black Belt Online Seminar Amazon SageMaker Advanced Session
20190213 AWS Black Belt Online Seminar Amazon SageMaker Advanced Session
 
AWS CLOUD 2018- AWS의 새로운 통합 머신러닝 플랫폼 서비스, Amazon SageMaker (김무현 솔루션즈 아키텍트)
AWS CLOUD 2018- AWS의 새로운 통합 머신러닝 플랫폼 서비스, Amazon SageMaker (김무현 솔루션즈 아키텍트)AWS CLOUD 2018- AWS의 새로운 통합 머신러닝 플랫폼 서비스, Amazon SageMaker (김무현 솔루션즈 아키텍트)
AWS CLOUD 2018- AWS의 새로운 통합 머신러닝 플랫폼 서비스, Amazon SageMaker (김무현 솔루션즈 아키텍트)
 
Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Serverless computing with AWS Lambda
Serverless computing with AWS Lambda
 
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するためにAmazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
 
Presto ベースのマネージドサービス Amazon Athena
Presto ベースのマネージドサービス Amazon AthenaPresto ベースのマネージドサービス Amazon Athena
Presto ベースのマネージドサービス Amazon Athena
 
20190806 AWS Black Belt Online Seminar AWS Glue
20190806 AWS Black Belt Online Seminar AWS Glue20190806 AWS Black Belt Online Seminar AWS Glue
20190806 AWS Black Belt Online Seminar AWS Glue
 
20190828 AWS Black Belt Online Seminar Amazon Aurora with PostgreSQL Compatib...
20190828 AWS Black Belt Online Seminar Amazon Aurora with PostgreSQL Compatib...20190828 AWS Black Belt Online Seminar Amazon Aurora with PostgreSQL Compatib...
20190828 AWS Black Belt Online Seminar Amazon Aurora with PostgreSQL Compatib...
 
20190320 AWS Black Belt Online Seminar Amazon EBS
20190320 AWS Black Belt Online Seminar Amazon EBS20190320 AWS Black Belt Online Seminar Amazon EBS
20190320 AWS Black Belt Online Seminar Amazon EBS
 
20200617 AWS Black Belt Online Seminar Amazon Athena
20200617 AWS Black Belt Online Seminar Amazon Athena20200617 AWS Black Belt Online Seminar Amazon Athena
20200617 AWS Black Belt Online Seminar Amazon Athena
 
AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築
AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築
AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築
 
20190326 AWS Black Belt Online Seminar Amazon CloudWatch
20190326 AWS Black Belt Online Seminar Amazon CloudWatch20190326 AWS Black Belt Online Seminar Amazon CloudWatch
20190326 AWS Black Belt Online Seminar Amazon CloudWatch
 
Serverless computing
Serverless computingServerless computing
Serverless computing
 

Similar to Ten Tips And Tricks for Improving Your GraphQL API with AWS AppSync (MOB401) - AWS re:Invent 2018

Building Real-Time Serverless Backends with GraphQL | AWS Floor28
Building Real-Time Serverless Backends with GraphQL | AWS Floor28Building Real-Time Serverless Backends with GraphQL | AWS Floor28
Building Real-Time Serverless Backends with GraphQL | AWS Floor28Amazon Web Services
 
Danilo Poccia - Real-Time Serverless Backends with GraphQL - Codemotion Berli...
Danilo Poccia - Real-Time Serverless Backends with GraphQL - Codemotion Berli...Danilo Poccia - Real-Time Serverless Backends with GraphQL - Codemotion Berli...
Danilo Poccia - Real-Time Serverless Backends with GraphQL - Codemotion Berli...Codemotion
 
Danilo Poccia - Real-Time Serverless Backends with GraphQL - Codemotion Berli...
Danilo Poccia - Real-Time Serverless Backends with GraphQL - Codemotion Berli...Danilo Poccia - Real-Time Serverless Backends with GraphQL - Codemotion Berli...
Danilo Poccia - Real-Time Serverless Backends with GraphQL - Codemotion Berli...Codemotion
 
Simpler by Design: Build a Better GraphQL API for Your Next App by Writing Le...
Simpler by Design: Build a Better GraphQL API for Your Next App by Writing Le...Simpler by Design: Build a Better GraphQL API for Your Next App by Writing Le...
Simpler by Design: Build a Better GraphQL API for Your Next App by Writing Le...Amazon Web Services
 
Building Real-Time Serverless Backends with GraphQL
Building Real-Time Serverless Backends with GraphQLBuilding Real-Time Serverless Backends with GraphQL
Building Real-Time Serverless Backends with GraphQLAmazon Web Services
 
Building Real-Time Serverless Backends with GraphQL
Building Real-Time Serverless Backends with GraphQLBuilding Real-Time Serverless Backends with GraphQL
Building Real-Time Serverless Backends with GraphQLAmazon Web Services
 
Building Real-time Serverless Backends with GraphQL
Building Real-time Serverless Backends with GraphQLBuilding Real-time Serverless Backends with GraphQL
Building Real-time Serverless Backends with GraphQLAmazon Web Services
 
Building Real-time Serverless Backends
Building Real-time Serverless BackendsBuilding Real-time Serverless Backends
Building Real-time Serverless BackendsAmazon Web Services
 
AppSync in real world - pitfalls, unexpected benefits & lessons learnt
AppSync in real world - pitfalls, unexpected benefits & lessons learntAppSync in real world - pitfalls, unexpected benefits & lessons learnt
AppSync in real world - pitfalls, unexpected benefits & lessons learntAWS User Group Bengaluru
 
Introduction to GraphQL and AWS Appsync on AWS - iOS
Introduction to GraphQL and AWS Appsync on AWS - iOSIntroduction to GraphQL and AWS Appsync on AWS - iOS
Introduction to GraphQL and AWS Appsync on AWS - iOSAmazon Web Services
 
Build a Serverless Application using GraphQL & AWS AppSync
Build a Serverless Application using GraphQL & AWS AppSyncBuild a Serverless Application using GraphQL & AWS AppSync
Build a Serverless Application using GraphQL & AWS AppSyncAmazon Web Services
 
Supercharging Applications with GraphQL and AWS AppSync
Supercharging Applications with GraphQL and AWS AppSyncSupercharging Applications with GraphQL and AWS AppSync
Supercharging Applications with GraphQL and AWS AppSyncAmazon Web Services
 
Building Serverless Applications Using AWS AppSync and Amazon Neptune (SRV307...
Building Serverless Applications Using AWS AppSync and Amazon Neptune (SRV307...Building Serverless Applications Using AWS AppSync and Amazon Neptune (SRV307...
Building Serverless Applications Using AWS AppSync and Amazon Neptune (SRV307...Amazon Web Services
 
Analyze Amazon CloudFront and Lambda@Edge Logs to Improve Customer Experience...
Analyze Amazon CloudFront and Lambda@Edge Logs to Improve Customer Experience...Analyze Amazon CloudFront and Lambda@Edge Logs to Improve Customer Experience...
Analyze Amazon CloudFront and Lambda@Edge Logs to Improve Customer Experience...Amazon Web Services
 
Building Serverless ETL Pipelines
Building Serverless ETL PipelinesBuilding Serverless ETL Pipelines
Building Serverless ETL PipelinesAmazon Web Services
 
Take Mobile and Web Apps to the Next Level with AWS AppSync and AWS Amplify
Take Mobile and Web Apps to the Next Level with AWS AppSync and AWS Amplify Take Mobile and Web Apps to the Next Level with AWS AppSync and AWS Amplify
Take Mobile and Web Apps to the Next Level with AWS AppSync and AWS Amplify Amazon Web Services
 
Developing Well-Architected Android Apps with AWS (MOB302) - AWS re:Invent 2018
Developing Well-Architected Android Apps with AWS (MOB302) - AWS re:Invent 2018Developing Well-Architected Android Apps with AWS (MOB302) - AWS re:Invent 2018
Developing Well-Architected Android Apps with AWS (MOB302) - AWS re:Invent 2018Amazon Web Services
 
Authentication & Authorization in GraphQL with AWS AppSync (MOB402) - AWS re:...
Authentication & Authorization in GraphQL with AWS AppSync (MOB402) - AWS re:...Authentication & Authorization in GraphQL with AWS AppSync (MOB402) - AWS re:...
Authentication & Authorization in GraphQL with AWS AppSync (MOB402) - AWS re:...Amazon Web Services
 

Similar to Ten Tips And Tricks for Improving Your GraphQL API with AWS AppSync (MOB401) - AWS re:Invent 2018 (20)

Building Real-Time Serverless Backends with GraphQL | AWS Floor28
Building Real-Time Serverless Backends with GraphQL | AWS Floor28Building Real-Time Serverless Backends with GraphQL | AWS Floor28
Building Real-Time Serverless Backends with GraphQL | AWS Floor28
 
Danilo Poccia - Real-Time Serverless Backends with GraphQL - Codemotion Berli...
Danilo Poccia - Real-Time Serverless Backends with GraphQL - Codemotion Berli...Danilo Poccia - Real-Time Serverless Backends with GraphQL - Codemotion Berli...
Danilo Poccia - Real-Time Serverless Backends with GraphQL - Codemotion Berli...
 
Danilo Poccia - Real-Time Serverless Backends with GraphQL - Codemotion Berli...
Danilo Poccia - Real-Time Serverless Backends with GraphQL - Codemotion Berli...Danilo Poccia - Real-Time Serverless Backends with GraphQL - Codemotion Berli...
Danilo Poccia - Real-Time Serverless Backends with GraphQL - Codemotion Berli...
 
Simpler by Design: Build a Better GraphQL API for Your Next App by Writing Le...
Simpler by Design: Build a Better GraphQL API for Your Next App by Writing Le...Simpler by Design: Build a Better GraphQL API for Your Next App by Writing Le...
Simpler by Design: Build a Better GraphQL API for Your Next App by Writing Le...
 
Building Real-Time Serverless Backends with GraphQL
Building Real-Time Serverless Backends with GraphQLBuilding Real-Time Serverless Backends with GraphQL
Building Real-Time Serverless Backends with GraphQL
 
Building Real-Time Serverless Backends with GraphQL
Building Real-Time Serverless Backends with GraphQLBuilding Real-Time Serverless Backends with GraphQL
Building Real-Time Serverless Backends with GraphQL
 
Building Real-time Serverless Backends with GraphQL
Building Real-time Serverless Backends with GraphQLBuilding Real-time Serverless Backends with GraphQL
Building Real-time Serverless Backends with GraphQL
 
Building Real-time Serverless Backends
Building Real-time Serverless BackendsBuilding Real-time Serverless Backends
Building Real-time Serverless Backends
 
AppSync in real world - pitfalls, unexpected benefits & lessons learnt
AppSync in real world - pitfalls, unexpected benefits & lessons learntAppSync in real world - pitfalls, unexpected benefits & lessons learnt
AppSync in real world - pitfalls, unexpected benefits & lessons learnt
 
Introduction to GraphQL and AWS Appsync on AWS - iOS
Introduction to GraphQL and AWS Appsync on AWS - iOSIntroduction to GraphQL and AWS Appsync on AWS - iOS
Introduction to GraphQL and AWS Appsync on AWS - iOS
 
Build a Serverless Application using GraphQL & AWS AppSync
Build a Serverless Application using GraphQL & AWS AppSyncBuild a Serverless Application using GraphQL & AWS AppSync
Build a Serverless Application using GraphQL & AWS AppSync
 
AppSync and GraphQL on iOS
AppSync and GraphQL on iOSAppSync and GraphQL on iOS
AppSync and GraphQL on iOS
 
Supercharging Applications with GraphQL and AWS AppSync
Supercharging Applications with GraphQL and AWS AppSyncSupercharging Applications with GraphQL and AWS AppSync
Supercharging Applications with GraphQL and AWS AppSync
 
Building Serverless Applications Using AWS AppSync and Amazon Neptune (SRV307...
Building Serverless Applications Using AWS AppSync and Amazon Neptune (SRV307...Building Serverless Applications Using AWS AppSync and Amazon Neptune (SRV307...
Building Serverless Applications Using AWS AppSync and Amazon Neptune (SRV307...
 
Analyze Amazon CloudFront and Lambda@Edge Logs to Improve Customer Experience...
Analyze Amazon CloudFront and Lambda@Edge Logs to Improve Customer Experience...Analyze Amazon CloudFront and Lambda@Edge Logs to Improve Customer Experience...
Analyze Amazon CloudFront and Lambda@Edge Logs to Improve Customer Experience...
 
Building Serverless ETL Pipelines
Building Serverless ETL PipelinesBuilding Serverless ETL Pipelines
Building Serverless ETL Pipelines
 
Take Mobile and Web Apps to the Next Level with AWS AppSync and AWS Amplify
Take Mobile and Web Apps to the Next Level with AWS AppSync and AWS Amplify Take Mobile and Web Apps to the Next Level with AWS AppSync and AWS Amplify
Take Mobile and Web Apps to the Next Level with AWS AppSync and AWS Amplify
 
Developing Well-Architected Android Apps with AWS (MOB302) - AWS re:Invent 2018
Developing Well-Architected Android Apps with AWS (MOB302) - AWS re:Invent 2018Developing Well-Architected Android Apps with AWS (MOB302) - AWS re:Invent 2018
Developing Well-Architected Android Apps with AWS (MOB302) - AWS re:Invent 2018
 
Authentication & Authorization in GraphQL with AWS AppSync (MOB402) - AWS re:...
Authentication & Authorization in GraphQL with AWS AppSync (MOB402) - AWS re:...Authentication & Authorization in GraphQL with AWS AppSync (MOB402) - AWS re:...
Authentication & Authorization in GraphQL with AWS AppSync (MOB402) - AWS re:...
 
Taking serverless to the edge
Taking serverless to the edgeTaking serverless to the edge
Taking serverless to the edge
 

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
 

Ten Tips And Tricks for Improving Your GraphQL API with AWS AppSync (MOB401) - AWS re:Invent 2018

  • 1. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Ten Tips and Tricks for Improving Your GraphQL API with AWS AppSync Michael Paris SDE AWS M O B 4 0 1
  • 2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda Schema design Data design Using AWS Lambda Realtime data Rapid development techniques Offline data CI / CD Operations and monitoring Testing APIs Schema governance
  • 3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Everything in your API revolves around the schema Here are a few tips to help build more resilient, evolvable schemas Schema design
  • 4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Why? GraphQL type names are unique You may proxy multiple services that expose similarly named data Tip: Use long, descriptive names that adhere to a pattern For example, you might use <Service><Type> and have names like AWSLambdaFunction Use long, descriptive names
  • 5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Input and output patterns Use a single input type per mutation field. type Mutation { # Use a single input field per mutation createUserPost(input: CreateUserPostInput!): UserPost }
  • 6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Input and output patterns (advanced) type Mutation { # Also consider explicit output types createUserPost(input: CreateUserPostInput!): CreateUserPostOutput } # The query reference allows arbitrary reads after a write type CreateUserPostOutput { userPost: UserPost query: Query }
  • 7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Input and output patterns (advanced) mutation ReadAfterWrite { createUserPost(input: { title: “GraphQL @re:invent” }) { userPost { title } # Returns the updated object query { # Perform and arbitrary read after the update in the same req userFeed { title } } } }
  • 8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Pagination patterns Come up with a pagination pattern that works for you. Think about your pagination requirements Do you need a cursor per item? What pagination related data do you need access to? Do the edges in your graph contain data? For example, is a friendship accepted or not
  • 9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. A simple pagination pattern # Simple and effective type UserPostConnection { items: [UserPost] nextToken: String } type User { id: ID! posts: UserPostConnection } type UserPost { id: ID! content: String }
  • 10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. A simple pagination pattern query SimplePaginatedQuery { listObjects(limit: 10, nextToken: “…”) { items { id title } nextToken # Finished when null } }
  • 11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. An advanced pagination pattern # Connections wrap edges. type UserFriendshipConnection { edges: [UserFriendshipEdge] pagination: PageInfo } # Edges wrap nodes. type UserFriendshipEdge { node: User cursor: String isAccepted: Boolean # data on the edge } # Wrapper for pagination related data. type PageInfo { hasNextPage: Boolean hasPrevPage: Boolean count: Int # extra page data }
  • 12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. An advanced pagination pattern query AdvancedPaginatedQuery { listObjects(first: 10, after: “…”) { # or last: 10, before: “…” edges { node { id title } cursor } pageInfo { hasNextPage hasPrevPage } # Finished when one is false } }
  • 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Use the best database for the job Amazon DynamoDB - A great primary data store that scales Amazon Elasticsearch Service (Amazon ES) - Rich search over large data sets Amazon Relational Database Service (Amazon RDS) - Store transactional & relational data Data design
  • 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. GraphQL with Amazon DynamoDB GraphQL Operation DynamoDB Operation Mutation.create<Type> PutItem Mutation.update<Type> UpdateItem Mutation.delete<Type> DeleteItem Query.get<Type> GetItem Query.list<Type> Scan or Query DynamoDB operations map really well to GraphQL
  • 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Add relational capabilities to NoSQL type User { id: ID! username: String! tasks: [Task] } type Task { id: ID! title: String! user: User } id username 1 Michael 2 Jay 3 Zach id userId title 1 1 Write Slides 2 1 Prep Demo 3 3 Study For Exam 4 2 Review User Feedback # Query the Task table’s GSI # GetItem on the User Table
  • 16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Add relational capabilities to NoSQL query GetUserAndOwnedPosts { getUser(id: “1”) { id username tasks { id title } } } id username 1 Michael 2 Jay 3 Zach userId id title 1 1 Write Slides 1 2 Prep Demo 3 3 Study For Exam 2 4 Review User Feedback GetItem Query a table or index where userId = $ctx.source.id
  • 17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. And the inverse query GetUserAndOwnedPosts { getTask(id: “1”) { username owner { username } } } id username 1 Michael 2 Jay 3 Zach id userId title 1 1 Write Slides 2 1 Prep Demo 3 3 Study For Exam 4 2 Review User Feedback
  • 18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Adding search to an API Amazon DynamoDB Low latency & high availability at any scale Query patterns must be designed into the database structure Amazon Elasticsearch Service Rich DSL for full-text search and analytical queries Often used as a secondary store for ad-hoc queries and analysis
  • 19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. DynamoDB + Amazon ES
  • 20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Elasticsearch Service resolvers query SearchTasks { searchTasksByTitle( title: “Demo” ) { items { id title } } } id userId title 1 1 Write Slides 2 1 Prep Demo 3 3 Study For Exam 4 2 Review User Feedback GET /tasks/_search { "query": { "match" : { ”title" : ”$ctx.args.title" } } }
  • 21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Storing files Amazon Simple Storage Service (Amazon S3) A low latency, high-availability blob storage service World-wide CDNs offer improved performance for mobile & web Use AWS AppSync to store pointers to files in Amazon S3 Use S3 SDKs directly from the client for faster upload & download
  • 22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Storing files type User { id: ID! username: String! profilePicture: S3Object } type S3Object { bucket: String key: String region: String } input S3ObjectInput { bucket: String! key: String! region: String! }
  • 23. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Saving a file mutation CreateUser { createUser(input: { username: “janedoe”, profilePicture: { bucket: “unique-bucket-name”, key: “path/to/file.png”, region: “us-west-2” } }) { id location { bucket key region } } }
  • 24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Reading files query GetUser { getUser(id: “1”) { id location { bucket key region } } }
  • 25. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Add business logic to an API without deploying servers Connect any data source, internal or external Tip: Use a standard event structure when resolving fields with Lambda Leveraging AWS Lambda
  • 26. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Use a standard event structure type User { id: ID! username: String! socialFriends: [SocialUser] } { Arguments: $ctx.args, TypeName: “User”, FieldName: “socialFriends”, Source: $ctx.source, Identity: $ctx.identity }
  • 27. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Use a standard event structure type Query { pingLambda: Boolean } { Arguments: $ctx.args, TypeName: “Query”, FieldName: “pingLambda”, Source: $ctx.source, Identity: $ctx.identity }
  • 28. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Should I use a single Lambda function everywhere? type User { id: ID! username: String! socialFriends: [SocialUser] } type Query { pingLambda: Boolean } const = => => const const return await
  • 29. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Should I use many Lambda functions? type User { id: ID! username: String! socialFriends: [SocialUser] } type Query { pingLambda: Boolean } // Implement a specific User.socialFriends function // Implement a specific Query.pingLambda function
  • 30. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Should I use a single Lambda function everywhere? Using a single function Can benefit from container warming One code base for all of your resolvers can be easier to manage Using many functions Greater separation of concerns Deploy resolvers independently Split ownership of resolver code to many teams
  • 31. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Real-time data GraphQL subscriptions enable real-time communication AWS AppSync doubles as a pub-sub broker via MQTT over WebSockets Common question: How to authorize subscriptions?
  • 32. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. GraphQL subscriptions AWS AppSync subscriptions are reactions to mutations. Subscribe to any mutation without additional configuration. type Mutation { publish: Message } type Subscription { subscribe: Message @aws_subscribe(mutations: [“publish”]) }
  • 33. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Authorizing subscriptions Naïve subscription implementations are subject to fan-out problems If there are 1M connected clients, how do I authorize & route messages to each client? 1M connected clients * 1M messages = 1 trillion publishes Two-part solution: Authorize subscriptions at connect time. Have the topic names themselves transparently encode comparisons.
  • 34. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Authorizing subscriptions type Subscription { onCreateMessage(chatRoomId: ID!): Message @aws_subscribe(mutations: [“createMessage”]) }
  • 35. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Subscription queries open connections subscription AuthorizedSubscription { onCreateMessage(chatRoomId: “1”) { id chatRoomId content } } chatRoomId
  • 36. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Subscription queries open connections subscription AuthorizedSubscription { onCreateMessage(chatRoomId: “1”) { … } } subscription AuthorizedSubscription { onCreateMessage(chatRoomId: “2”) { … } }
  • 37. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Mutations publish to topics mutation CreateMessage { createMessage(input: {…}) { id chatRoomId content } }
  • 38. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Authorizing subscriptions Subscriptions are no longer subject to fan-out problems Publishes are no longer dependent on the # of connected clients. 32 (max) topics * 1M messages = 32M (max) publishes. This is now a manageable problem. The solution (recap): Authorize subscriptions at connect time. Have the topic names themselves transparently encode any comparisons.
  • 39. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Rapid development techniques AWS Amplify CLI generates infrastructure via AWS CloudFormation Leverage the GraphQL transform to quickly build out data models Use the AWS Amplify framework and codegen to build client apps
  • 40. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Amplify CLI $ amplify add auth $ amplify add storage $ amplify add api $ amplify push Add an Amazon Cognito User Pool Create and secure an Amazon S3 bucket Add an AWS AppSync API Deploy via AWS CloudFormation
  • 41. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Rapidly build scalable, data-driven applications Leverages a new open-source project called the GraphQL Transform Declaratively define your application’s data model using GraphQL SDL Check your schema.graphql into git for easy version control Transforms your data model into a CloudFormation document that implements it Powered by GraphQL directives Comes with a set of pre-built transformers @model, @auth, @connection, @versioned, and @searchable AWS Amplify + AWS AppSync
  • 42. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. The @model transformer # schema.graphql type Post @model { id: ID! title: String! } $ amplify add api
  • 43. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. And voila! AWS Customer Account Post Table type Mutation { createPost(...): Post updatePost(...): Post deletePost(...): Post } type Query { getPost(...): Post listPosts(...): Post } type Subscription { onCreatePost(...): Post onUpdatePost(...): Post onDeletePost(...): Post } type Post { id: ID! title: String createdAt: String updatedAt: String } Schema Resolvers DataSources AWS AppSync createPost updatePost deletePost getPost listPosts Mutation Query Post Table DataSource Post Table ARN IAM Role ARN
  • 44. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. @auth type Post @model @auth(rules: [ { allow: owner } ]) { id: ID! title: String! owner: String } AWS Cloud Amazon DynamoDB Post Table type Mutation { createPost(...): Post updatePost(...): Post deletePost(...): Post } type Query { getPost(...): Post listPosts(...): Post } type Subscription { onCreatePost(...): Post onUpdatePost(...): Post onDeletePost(...): Post } Schema Resolvers DataSources AWS AppSync createPost updatePost deletePost getPost listPosts Mutation Query Post Table DataSource Post Table ARN IAM Role
  • 45. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. @connection type Post @model { id: ID! title: String! comments: [Comment!]! @connection(name: “PostComments”) } type Comment @model { id: ID! content: String! post: Post @connection(name: “PostComments”) } AWS Cloud Amazon DynamoDB Post Table type Mutation { createPost(...): Post updatePost(...): Post deletePost(...): Post createComment(...): Comment updateComment(...): Comment deleteComment(...): Comment } type Query { getPost(...): Post listPosts(...): Post getComment(...): Comment listComment(...): Comment } type Subscription { onCreatePost(...): Post onUpdatePost(...): Post onDeletePost(...): Post onCreateComment(...): Comment onUpdateComment(...): Comment onDeleteComment(...): Comment } Schema Resolvers DataSources AWS AppSync Mutation Query Post DataSource Post Table ARN IAM Role Comment Table Comment DataSource Post Table ARN IAM Role createComment updateComment deleteComment deletePost updatePost createPost getPost listPosts getComment listComments Post comments Comment post gsi-PostComments
  • 46. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Querying with @connection query GetPostAndComments { getPost(id: ”1”) { id title comments(limit: 10, nextToken: “...”) { items { id content } nextToken } } } gsi-PostComments
  • 47. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Amplify codegen $ amplify add codegen $ amplify codegen # Generate queries & native types from your GraphQL API # for iOS, Android, TypeScript, and Flow
  • 48. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Offline and delta sync Hydrate offline cache from main entity table Only synchronize the “delta” when coming back online Reconnection, exponential backoff, and retries handled by client Base query, subscription, and delta query work together
  • 49. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. ID Name Title … timestamp expdate 1 Nadia Hello World 1541884315162 1541884320 2 Pancho I’m Sleepy 1541884359527 1541884364 3 Shaggy Running in the park 1541884404015 1541884409 ID Name Title … 1 Nadia Hello World 2 Pancho I’m Sleepy 3 Shaggy Running in the park CreatePost1 (x) CreateDelta1 (x) Pipeline resolver createPost(input: CreatePostInput!): Post GraphQL schema mutation add{ createPost(Name:”Nadia” Title:“Hello World” ){ id Name Title } } Delta TablePost Table
  • 50. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. ID Name Title … timestamp expdate 1 Nadia Hello World 1541884315162 1541884320 2 Pancho I’m Sleepy 1541884359527 1541884364 3 Shaggy Running in the park 1541884404015 1541884409 ID Name Title … 1 Nadia Hello World 2 Pancho I’m Sleepy 3 Shaggy Running in the park Unit resolver (Scan/Query, optional paginate, etc.) listPosts : [Post] GraphQL schema Query list{ listPosts{ items { id Name Title } } } listDeltas(lastSync: AWSTimestamp!) : [DeltaPost] Delta TablePost Table
  • 51. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. ID Name Title … timestamp expdate 1 Nadia Hello World 1541884315162 1541884320 2 Pancho I’m Sleepy 1541884359527 1541884364 3 Shaggy Running in the park 1541884404015 1541884409 ID Name Title … 1 Nadia Hello World 2 Pancho I’m Sleepy 3 Shaggy Running in the park Unit resolver Conditional Scan/Query: lastSync <= timestamp AND expdate > NOW listPosts : [Post] GraphQL schema Query list{ listDeltas(lastSync:1541884330){ items { id Name Title } } } listDeltas(lastSync: AWSTimestamp!) : [DeltaPost] Delta TablePost Table
  • 52. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. CI/CD with AWS Amplify Console Simplified workflow for serverless web app development/deployment Manage multiple environments based on feature branches in git Atomic deployments via Lambda @ edge Connect to GitHub, Bitbucket, GitLab, and AWS CodeCommit Simple web hosting with custom domains
  • 53. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Operations and monitoring Enable Amazon CloudWatch logs in your AWS AppSync API APIs come with CloudWatch metrics out of the box Set alarms on 4xx, 5xx, and latency Use the AWS Amplify Analytics category for powerful client monitoring
  • 54. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Resolver auditing Pipeline resolvers allow a resolver to interact with multiple data sources A pipeline resolver is made up of many “functions” (not the same as Lambda functions) Create an “Audit” function that reports information about a resolver Attach this function to all the resolvers you want to audit Create custom alerts, reports, metrics
  • 55. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Testing APIs Integration Tests Trigger integration tests after AWS Amplify console deployments Run tests in AWS Lambda and trigger using CloudWatch events Canaries Try out CloudWatch scheduled events + AWS Lambda Generate test suites and fuzz APIs Introspect your APIs schema to generate test suites automatically
  • 56. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Schema governance Centralized schema governance Have one team manage the schema for the whole organization Easier than decentralized governance but puts one team on the spot Decentralized schema governance AWS AppSync APIs currently require a single schema document Build client tools to combine schemas from multiple teams into a single document GraphQL type extensions allow teams to manage their own sub graph
  • 57. Thank you! © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Michael Paris parismic@amazon.com @mikeparisstuff
  • 58. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.