Creates an AWS AppSync GraphQL API and defines a Mutation type for posting data.

Terraform Template

resource "aws_appsync_graphql_api" "example" {
  authentication_type = "API_KEY"
  name = "example"
}

resource "aws_appsync_type" "example" {
  api_id = aws_appsync_graphql_api.example.id
  definition = <<-EOF
    type Mutation
    
    {
    putPost(id: ID!,title: String! ): Post
    
    }
    
  EOF
  format = "SDL"
}