DjangoChannelsGraphqlWs icon indicating copy to clipboard operation
DjangoChannelsGraphqlWs copied to clipboard

Support the graphql-transport-ws subprotocol

Open LucasCoderT opened this issue 4 years ago • 9 comments

The Library currently supports the subscriptions-transport-ws subprotocol, but this library is no longer being maintained and recommends developers migrate to the graphql-ws library instead, which uses the graphql-transport-ws subprotocol, making it incompatible with this library.

I am happy to research how to implement this protocol with this library, I just wanted to open this issue to open a dialogue on other people's thoughts.

LucasCoderT avatar Jun 15 '21 21:06 LucasCoderT

It looks like it already support the graphql-ws library: AssertionError: WebSocket client does not request for the subprotocol graphql-ws!

It is just expecting the wrong protocol name

stam avatar Jun 18 '21 14:06 stam

I'm facing this particular issue too :(

Sanmonsua avatar Jun 23 '21 19:06 Sanmonsua

I would love to see this as well, especially since subscriptions-transport-ws is deprecated and has been largely unmaintained since 2018.

Unfortunately it's not just a matter of changing the protocol name.

The GraphQL over WebSocket Protocol is not cross-compatible with the legacy subscriptions-transport-ws and its accompanying Protocol.

fdev avatar Mar 06 '22 11:03 fdev

It looks like it already support the graphql-ws library: AssertionError: WebSocket client does not request for the subprotocol graphql-ws!

It is just expecting the wrong protocol name

From the Apollo page: Note: Confusingly, the subscriptions-transport-ws library calls its WebSocket subprotocol graphql-ws, and the graphql-ws library calls its subprotocol graphql-transport-ws! In this article, we refer to the two libraries (subscriptions-transport-ws and graphql-ws), not the two subprotocols.

So by expecting the graphql-ws subprotocol, this means that this library is supporting the deprecated subscriptions-transport-ws library and no the graphql-ws library !

jerome-labonte-udem avatar Jun 30 '22 11:06 jerome-labonte-udem

added a pull request #97 I hope it will be accepted soon it fixes this sorry for the wrong naming

kimutaiRop avatar Nov 16 '22 10:11 kimutaiRop

@prokher Any update on this issue considering the recent (and very much welcomed :heart: ) upgrade of DjangoChannelsGraphqlWs?

The latest versions of Django, Graphene and Channels are now supported, but supporting the latest websocket-based protocol is just as important.

The implemented WebSocket-based protocol was taken from the library subscription-transport-ws which ~is~ was used by the Apollo GraphQL.

As stated in my previous comment, the referred subscription-transport-ws library has been unmaintained since 2018 and Apollo has long switched to the newer protocol.

fdev avatar Apr 28 '23 11:04 fdev

@fdev, the protocol upgrade it is one of our next tasks, so stay tuned 😉

prokher avatar Apr 28 '23 13:04 prokher

I have the same issue. I hope it's fixed soon so we can use it.

ElMahdiAboulmanadel avatar Jun 29 '23 23:06 ElMahdiAboulmanadel

I also have the same problem. What is your prediction about the time of release of the new version? @prokher

emadimehrdad avatar Dec 02 '23 09:12 emadimehrdad