Hasura Subscriptions - 1 User is receiving everyone else's notifications #9848
Unanswered
IslandRum88
asked this question in
Question
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm running a Hasura 2.32 Server on-prem via Docker container. The backend is MSSQL 2019.
Background:
We have a Hasura Subscription to a notification table in MSSQL. The notification table has a user_id column which applies to a client logged into our front-end application (Vue2/Node). Any changes to the table will be streamed to the client which the requite User ID.
For Subscriptions, we are only reading from the notification table. (Which is a non-materialized view) We are not updating/mutating it via Hasura.
This works when a single user is logged in. And the user is able to see the table changes being streamed to them.
The Problem:
Suppose three users are logged in. There are table changes that pertain to three separate users via a single transaction. All three users should receive a notification. However, we have observed the notifications are sent to only one person. And it contains the data pertaining to all three of them. We believe this is an issue with the Hasura configuration.
It would be greatly appreciated if someone has any tips on how to troubleshoot this? Or if there's any other suggestions on how we can tackle this.
For context here's the GraphQL Query we're using:
subscription getNotification($for_user: String) { v_coverage_notification(where: { for_user: { _eq: $for_user } }, order_by: { created_dt: desc }) { read_dt coverage_notification_id coverage_id coverage_edit_history_id notification_type_cd for_user created_dt created_by_nm created_by } }
We're honestly lost on how to proceed on this. Any help would be greatly appreciated
Beta Was this translation helpful? Give feedback.
All reactions