2 個答案
- 最新
- 最多得票
- 最多評論
0
AppSync subscriptions publish the object that is returned by the mutation (after filtering subscription selection set fields). That means that if you include the related field in the selection set of the mutations and the subscription query then you will be able to subscribe to the connected information.
E.G.
mutation {
updatePerson(input: { ... }) {
id
cities { items { id name persons { items { id } } } }
}
}
subscription {
onUpdatePerson {
id
cities { items { id name persons { items { id } } } }
}
}
已回答 5 年前
0
Thanks a lot! That explains it, and it makes sense. I'd be happy to contribute this to the Amplify docs, if that's possible. I'll see if it's open for edits.
BTW, Amplify is a fantastic service, kudos for the great work.
已回答 5 年前
相關內容
- AWS 官方已更新 1 年前