2 Respuestas
- Más nuevo
- Más votos
- Más comentarios
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 } } } }
}
}
respondido hace 5 años
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.
respondido hace 5 años
Contenido relevante
- OFICIAL DE AWSActualizada hace 4 meses
- OFICIAL DE AWSActualizada hace 2 años