Skip to content

Question related to Inactive Users #7

Answered by enisdenjo
kefniark asked this question in Q&A
Discussion options

You must be logged in to vote

Hey hey, graphql-sse and graphql-ws are both in lazy mode by default - they'll establish a connection with the server exclusively if there's a subscription running. I'd say the best way to manage inactive users is to handle it yourself since there's not a single sweet spot that can satisfy everyone.

Additionally, both graphql-sse and graphql-ws are isomorphic, they can run in a browser and in a Node environment. Bundling browser primitives is therefore a no-go. The isomorphic solution here would be to use some magic numbers for inactivity detection, and I don't really like magic in code.

One way of approaching the problem, on the browser, is to simply hook onto some great browser events t…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by kefniark
Comment options

You must be logged in to vote
1 reply
@enisdenjo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #6 on November 18, 2021 16:17.