Stack Overflow Asked on December 22, 2021
I am reading realtime data documentation but do not understandwhat is the purpose of @aws_subscribe
. Could somebody explain this in simple English? Examples about how subscriptions works with/without annotation will help a lot.
Using the @aws_subscribe directive, you can declare the mutations a subscription is subscribed to. For example:
type Mutation {
createPost(): Post
editPost(): Post
deletePost(): Post
}
type Subscription {
updatedPost(): Post
@aws_subscribe(mutations: ["createPost","editPost","deletePost"])
}
Answered by Rick Foxcroft on December 22, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP