Trigger AppSync subscription notification asynchronously

0

I have some processing that takes place asynchronously and I would like to notify my AppSync subscribers when the processing finishes. How can I have my asynchronous Lambda function notify Apollo-AppSync client subscribers when the processing is complete?

I am only using Cognito User Pool authentication with my API.

Why is there no AppSync topic on re:Post?

posta 2 anni fa1069 visualizzazioni
3 Risposte
0
Risposta accettata
con risposta 2 anni fa
profile picture
ESPERTO
verificato un mese fa
0

You can leverage the concept of Local Resolvers for your task.

Asynchronous Lambda can invoke mutation on a None datasource, which will cause mutation result (can be as simple as an echo of all input arguments) to be forwarded to all subscription clients.

You can review How do I notify AWS AppSync subscribers of external database updates that aren't performed by client-side mutations? for more details and step-by-step implementation guidelines.

AWS
con risposta 2 anni fa
profile picture
ESPERTO
verificato un mese fa
0

What is the best practice for having my Lambda invoke a mutation? Right now my AppSync API is authorized via Cognito User Pools.

mish
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande