sillsdev / languageforge-lexbox

Lexbox, SIL linguistic data hub
MIT License
7 stars 2 forks source link

Users accepting invites don't show up in admin dashboard tabs until refreshed #1067

Closed rmunn closed 4 weeks ago

rmunn commented 4 weeks ago

Describe the bug When a user accepts an email invite, their newly-created account doesn't show up in any open admin dashboard tabs until a browser refresh invalidates the GraphQL cache. Worse, if the admin is on a different tab (say, the project page from which he invited the user) and

To Reproduce Steps to reproduce the behavior:

  1. Log in as admin, go to sena-3 project
  2. Invite a new user by email
  3. In another browser, go to localhost:1080, accept the invitation, and register
  4. In first browser (logged in as admin), click "Admin Dashboard" button
  5. Note user does not show up in Users list
  6. Reload browser tab
  7. User shows up in Users list

Expected behavior The GraphQL cache for the Users list would be invalidated when a user accepts an email invitation.

hahn-kev commented 4 weeks ago

I don't think we can fix this without setting up subscriptions or something, otherwise how is the frontend supposed to know when another user on another machine accepts an invite?

rmunn commented 4 weeks ago

Our awaitedQueryStore isn't setting up GraphQL subscriptions? Ah, right, it isn't. Then, yeah, this is a bit of an annoyance and could in theory be fixed in dev but it's not really worth spending time on. I'll close this with the option of reopening it later on if we decide that subscriptions are worth the time and effort.