Answer the question
In order to leave comments, you need to log in
How to get a response from the server after a certain time?
Hello!
There is a graphql server (apollo-server)
The site has some kind of timer, at the end of this timer, a response with data should come from the server
. How is this implemented?
Of course, you can subscribe when entering the site, and set setTimeout on the server (it seems to me that this is a stupid decision), and upon completion, it will send the result to this subscription
BUT! what if the server rebooted? time will slip.
Are there any implementation examples? What technologies to use?
For example:
The site has a block with a post, the content opens after 1 hour (we set the opening time through the database)
After 1 hour, the value of isOpen in the database should change to true
And users who are online notify about this
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question