Websocket protocol update


wanted to ask about the current state of the Dgraph graphql websocket protocol usage.
I use the subscriptions-transport-ws library for subscriptions, but get always the warning, that it is deprecated and I should update to graphql-ws. Last time I tried switching on the client, Dgraph did not accepted the connection.

Is the switch coming on Dgraph, or is it actually not that important? Or it is already supported but I made a mistake? :smiley:

This is an accepted Issue. See Websockets Protocol (subscriptions-transport-ws) is Depreciated · Issue #8174 · dgraph-io/dgraph · GitHub
I’m working on the backlog priority. Could you tell me how blocking this issue is for you and if you have a workaround ?
I’ll hopefully get a time horizon for this in January as we will work with the engineering team to address all the pending features and enhancement requests.


Hey, nice to hear :+1:t2:
Currently it blocks the graphql subscriptions, because we use JWT tokens that refreshes in the background. Sadly subscriptions-transport-ws has a problem with exchanging the token by reconnection and keeping the subscriptions open: How to restart connection with new connection params? · Issue #171 · apollographql/subscriptions-transport-ws · GitHub
Workaround is to repeat a query request each few seconds to simulate a subscription query. I found no working solution.

1 Like