- terraform
- AWS account
- AWS CLI configured
terraform init
terraform apply
Go to the AWS Management Console and subscribe to new Todo items:
subscription MySubscription {
newTodo(name: "todo1") {
checked
created
name
id
}
}
On a separate tab, create a new Todo:
mutation MyMutation {
addTodo(name: "todo1", userId: "user1") {
id
name
created
checked
}
}
There is an event on the first tab. Try again with a different name:
mutation MyMutation {
addTodo(name: "todo5", userId: "user1") {
id
name
created
checked
}
}
No event this time.
Subscribe to the other subscription field:
subscription MySubscription {
todo(userId: "user1") {
todo {
checked
created
id
name
}
}
}
Create a Todo item:
mutation MyMutation {
addTodo(name: "todo5", userId: "user1") {
id
}
}
There is an event. Notice that the Mutation has fewer fields than the Subscription.
terraform destroy