-
Here is my case:currently I’m using the graphql-sse on my server side and urql on my nexts client side.I already implemented a notification subscription function which will notify the user someone has followed or following author published new blog.The problem is I put the notification in my _app.ts file so it will only work while user is online.for example,if someone followed the user and in the whiletime user did’t open the website ,this notification will never show. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You'd have to implement a notification queue that would have a delivered status set to true whenever the user is online and the subscription goes through. For whenever the use missed the notification, you simply query all non-delivered notifications and display them to the user. This is something outside of graphql-sse scope, since this library just deals with transport. You'd have to implement this queue system yourself. Am not aware if there's anything out there, you can Google around - or implement it yourself since it's not that complicated. |
Beta Was this translation helpful? Give feedback.
You'd have to implement a notification queue that would have a delivered status set to true whenever the user is online and the subscription goes through.
For whenever the use missed the notification, you simply query all non-delivered notifications and display them to the user.
This is something outside of graphql-sse scope, since this library just deals with transport. You'd have to implement this queue system yourself. Am not aware if there's anything out there, you can Google around - or implement it yourself since it's not that complicated.