// JavaScript resolver for createPost export function request(ctx) return operation: "PutItem", key: id: Util.autoId() , attributeValues: title: ctx.args.title, content: ctx.args.content ;
type Mutation createPost(title: String!, content: String): Post appsync
type Subscription onCreatePost: Post @aws_subscribe(mutations: ["createPost"]) key: id: Util.autoId()
type Query getPost(id: ID!): Post