2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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 } } } }
}
}
répondu il y a 5 ans
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.
répondu il y a 5 ans
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- demandé il y a 5 mois
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 3 mois
- Comment mieux gérer les notifications relatives à l'application de correctifs dans Systems Manager ?AWS OFFICIELA mis à jour il y a 10 mois