datadvance / DjangoChannelsGraphqlWs

Django Channels based WebSocket GraphQL server with Graphene-like subscriptions
MIT License
281 stars 84 forks source link

Support the graphql-transport-ws subprotocol #71

Open LucasCoderT opened 3 years ago

LucasCoderT commented 3 years ago

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.

stam commented 3 years ago

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

Sanmonsua commented 3 years ago

I'm facing this particular issue too :(

fdev commented 2 years ago

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.

jerome-labonte-udem commented 2 years ago

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 !

kimutaiRop commented 1 year ago

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

fdev commented 1 year ago

@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.

prokher commented 1 year ago

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

ElMahdiAboulmanadel commented 1 year ago

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

emadimehrdad commented 11 months ago

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