aws cloudformation create-stack \
--stack-name AWSAppSyncTutorialForAmazonDynamoDB \
--template-url https://s3.us-west-2.amazonaws.com/awsappsync/resources/dynamodb/AmazonDynamoDBCFTemplate.yaml \
--capabilities CAPABILITY_NAMED_IAM
Sau khi chạy câu lệnh này một bảng AppSyncTutorial-Post được tạo
Mở bảng điều khiển của AWS AppSync
Ấn Create API, chọn GraphQL APIs


AWSAppSyncTutorial), sau đó ấn Next



schema {
query: Query
mutation: Mutation
}
type Query {
getPost(id: ID): Post
}
type Mutation {
addPost(
id: ID!
author: String!
title: String!
content: String!
url: String!
): Post!
}
type Post {
id: ID!
author: String
title: String
content: String
url: String
ups: Int!
downs: Int!
version: Int!
}


PostDynamoDBTable
