-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
:resume-subscriptions? on subsequent init #67
Comments
Hi, That option is actually to determine the behaviour when the websocket connection is lost and then reconnected - it will re-subscribe if that flag is true, and won't if not. If you re-initialise re-graph it loses all state including which subscriptions existed (its usage is here: https://github.com/oliyh/re-graph/blob/master/src/re_graph/internals.cljc#L211) There's nothing to directly support your use case, but it should be possible. You need to reach into the re-frame database via If this works for you then we could add a new API call to achieve this so you're not delving around in the internals. |
Hi thanks for your help @hipitihop and I work together The following code worked to refresh the jwt authentication
note the above code is heavy edited. An API call to refresh the connection-payload would be great. Thanks |
Hi, |
Hi @stumitchell and @hipitihop did you have a chance to look at my suggestion? Thanks, |
yeah that seems to work too, Not noticeably faster though still about a 6 second delay, Stu |
Hi @stumitchell and @hipitihop I have just pushed |
We use JWT auth tokens with expiry time and organise to refresh the JWT token prior to expiry, in turn, when we get the refreshed token, we dispatch ::re-graph/init again, however, despite specifying
:resume-subscriptions? true
any existing subscriptions are dropped.Is this a bug or do you recommend a way to deal with this use case ?
The text was updated successfully, but these errors were encountered: