Auto update React.js front-end, when items added in DynamoDb

Auto update React.js front-end, when items added in DynamoDb


0

I’m developing a serverless AWS app.
For the front-end I’m using react.js, for the back-end (REST API calls), I’m using Claudia API Builder (API Gateway & Lambdas) and I store my data in DynamoDB tables.

Problem
I want, whenever a user adds an item in a DynamoDB table, this to be shown automatically to the admin who is logged-in in the front end. I use cognito for managing the users in the app.

At the moment, trying to keep the front-end up-to-date with what happens in DynamoDB, I just fetch what’s in there every minimute, which is not very efficient.

From a research I did online, the solution seems to be, using graphQL with AWS AppSync and subscription to the DynamoDB table mutations.

At the moment Claudia API Builder manages all the CRUD API functionality on DynamoDB and I’m ok with that, apart from this one specific case (keep my front-end up-to-date with DynamoDB).

Question
Is using graphQL the only way to solve my problem or there’s a different way?
Would it be possible anyhow to connect the front-end with another AWS service such as DynamoDB streams for example or SQS or something and subscribe those services to the DynamoDB mutations instead?

If graphsQL and AppSync is the only way through, is there a reference to a simple working example online you could recomment, coz AWS docs doesn’t seem to be very helpful?

Thanks!

New contributor

Chris Ng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


Load 5 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *