0

I have a logic where on a backend side I have an automation which changes mysql database table. When a user goes on website to see those changes I need to show them in realtime. If db changes I want to show changes right away in realtime.

I heard that graphQL has subscription method. Is it possible to implement with graphQL + Express + React?

I also know Firebase has this option, but I have to use SQL table. I can't use Firebase db.

Eldar Tailov
  • 358
  • 5
  • 18
  • This is not something you want to solve inside MySQL. Add a webocket system to your backend, and send a message every time there was a change. Your service knows theres a change. If you have multiple backend services you need an extrernal event management system like Redis PubSub. – Evert Sep 06 '22 at 10:02

1 Answers1

0

you can use setInterval(yourfunction, delay) method to check if the database is updated.

user123123
  • 41
  • 6
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 10 '22 at 11:48