The transport Protocol is completely different, so no - it does not work out of the box.
Dgraph uses Apollo’s subscriptions-transport-ws and their deprecated transport Protocol. The new Protocol is a rewrite and the two are not interchangeable.
Thought I mention this link. The also point out a couple of sec issues and shortcomings with the subscriptions-transport-ws protocoll (that you are probably aware of) and that make a compelling argument for me to stay away from it.
Yap, I referenced that blog in my original comment. I am fully aware of everything mentioned in the blog post as I am the one that wrote it (if you were talking to me).
Consider me ashamed, I am not sure what I was doing just then My apologies! Of course you do. Let me make the best of the situation and at least thank you for an excellent library and blog post.
Bumping this topic. Is there a current opinion from the DGraph dev team on the relative prioritization of this?
This has already been mentioned, but it stands out that the library in question is no longer supported. From the message on github repo:
The subscriptions-transport-ws library is not being actively maintained. It is recommended that you use the [graphql-ws](https://github.com/enisdenjo/graphql-ws) library instead. For details read the [GraphQL over WebSockets](https://the-guild.dev/blog/graphql-over-websockets) announcement.
Please don’t forget layer5+ ddos protection
i’ve never used the dgraph subscription feature, and won’t use graphql or graphql websocket, if there is no ddos protection.
Currently I have designed, that my Cloudflare Workers are kind of a middleware between the user and the dgraph DQL/GraphQL API.
Since websockets are a direct connection, this approach wouldn’t work anymore, since i would have to build elixir servers as a new performant middleware, and that’s again overkill
so ddos protection (maybe in cooperation with cloudflare?) would be very cool, to ensure that direct endpoints like the GraphQL endpoint, and more important, the direct GraphQL websocket endpoint, are not abused
Discord uses Cloudflare to protect its servers. If we want to build with dgraph the second Discord the second Facebook the second instagram, we need ddos protection too
check out: