Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix that live-query system sometimes does not send the changed result-set to the frontend #323

Closed
Venryx opened this issue May 29, 2024 · 2 comments

Comments

@Venryx
Copy link
Collaborator

Venryx commented May 29, 2024

Copied notes:

Also, I have replicated the problem with the "notifications" subscription sometimes not sending changes to the user: In my case, it happens if I clear the notifications table, load the page, then insert a notification entry for the user; the notification(s) do not start getting picked up on (by the client) until I refresh the page.

What's weird is that I've inspected the live-query system's internals (there's a page at localhost:5100/monitor/db/watchers for this, after entering the admin-key [the password of the pguser-admin... secret in k8s for now] on the monitor tool's homepage), and the live-query system is correctly noticing the new notifications and updating the live-query state. But for some reason it is not sending them to the user. So investigating this will be my next task.

@Venryx
Copy link
Collaborator Author

Venryx commented May 29, 2024

Might be due to not doing the subscription through mobx-graphlink atm, so sub doesn't get recreated after auth data being attached to websocket, so RLS rules are just filtering out the results.

@Venryx
Copy link
Collaborator Author

Venryx commented May 30, 2024

My guess in the comment above was correct; it was just a side-effect of not having the subscription managed by mobx-graphlink (ie. re-requesting the subscription after auth-data was attached to the websocket connection). For more details, see the commit here that fixes the issue: 97afa9c

@Venryx Venryx closed this as completed May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

1 participant