hasura / hasura/graphql-engine

Get list of active subscriptions

Open
#8,474 5 comments 6 reactions 0 assignees View on GitHub
k/enhancement
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Is your proposal related to a problem?

We are doing online chat, and would like to have a list of online users. Hasura proposes to push heartbeat inside database, and subscribe onto it. But why should we update last presence field in database if we already connected to hasura via subscription?
It seems that list of subscriptions is stored somewhere (with JWT information, that allows to work with permissions for each subscription), we just need to find where, and use that information to show which users are online.

### Describe the solution you'd like

Would like to see active subscriptions and jwt claims assigned to them in metadata. Then it will be possible to fetch them from metadata to form list of online users.

### Describe alternatives you've considered

Push heartbeat every 5-10 seconds to database, subscribe to view, which will show all users being active in last 30 seconds.

### If the feature is approved, would you be willing to submit a PR?

Unfortunately I can make PR only using JS, Haskel is not my power.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.