-
Notifications
You must be signed in to change notification settings - Fork 45
Suggestion: Use the DDP connection as a network interface #39
Comments
Nice! @stubailo ? Are there any downsides? Maybe this could be the default connection for meteor clients, for network efficiency's sake, and then we could also keep the |
that is a really cool way of thinking, that will also make apollo subscriptions easier to manage with meteor :) |
Honestly I'm not a big fan of this because there's a huge risk that the Meteor-specific transport will fall behind new features in the "standard" one. For example, if Meteor is doing retries under the hood and Apollo gets retry functionality, things are going to get weird. |
@stubailo, thanks for the feedback. I understand the hesitation. For websockets there isn't a good standard yet though (is there?), but we require a websocket connection for our specific app. So for me it looked like needless work to create a new websocket connection and implement authentication and everything, while I get it for free in Meteor. subscriptions-transport-ws is still WIP, so this seems like a safe bet until it's ready. For who's interested in using this, we open-sourced the above implementation: https://github.com/Swydo/ddp-apollo
|
Thanks for open-sourcing! |
Meteor supplies us with a great websocket implementation with authentication, retries and more. We could simply leverage this power by making a network interface that calls a DDP method:
Client
Server
I'm testing this for our own app and it's seems to work perfectly so far.
If people are interested in this I would love to make a PR for it. What do you think @lorensr?
The text was updated successfully, but these errors were encountered: