-
Notifications
You must be signed in to change notification settings - Fork 341
lazy mode and deferred connection params #124
lazy mode and deferred connection params #124
Conversation
Will write tests once the design is approved. |
seen here: #123 should solve dynamic authenticate needs |
@thebigredgeek I think @Urigo (busy atm) or @NeoPhi should review this. Reviewing will be a lot easier and PRs will be merged faster if you make this two separate (maybe stacked) PRs, one for the connectionParams function, one for the lazy connecting. I think connectionParams function is pretty easy to test and merge, lazy connecting might require more testing and more discussions. |
I can separate them, but merging one but not the other doesn't help me unfortunately. I'll try to find time for that if it ends up being necessary |
@thebigredgeek great job.
|
I personally like both approaches :) I also think there is a place for middleware before a subscription for other use cases to manipulate context or other features of the subscription request. So I think both pieces are useful separately and together. That's just my $.02 |
Yeah I agree @srtucker22 . I think the middleware stuff is super useful, but I want to be able to reject connections as they occur rather than just relying on ACL to determine whether a user should be able to subscribe etc. My main use case here is react native... where I can't do a "full page refresh" after login (which in my web app, login state is used to determine whether or not to decorate with the subscription transport network interface). |
|
Also @Urigo how do we want to test this? Seems like it might break a lot of the existing tests |
@thebigredgeek can you please explain why it might break the existing tests? the default behavior should be with |
@thebigredgeek I've also merged @srtucker22 changes, so please rebase again |
@Urigo ah yeah true. I guess the defaults to existing behavior means no breaking tests :D. Cool, I'll rebase and add test coverage. |
…geek/subscriptions-transport-ws into thebigredgeek-feature/lazyConnection # Conflicts: # src/client.ts
# Conflicts: # CHANGELOG.md
…nnection Rebase and minor code changes
thank you very much @thebigredgeek ! |
TODO: