Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better option #32

Closed
hongbo-miao opened this issue Jun 7, 2021 · 3 comments
Closed

Better option #32

hongbo-miao opened this issue Jun 7, 2021 · 3 comments

Comments

@hongbo-miao
Copy link

hongbo-miao commented Jun 7, 2021

Today in JavaScript world, graphql-ws is better option than subscriptions-transport-ws.
Just FYI 🙂

@pavelnikolov
Copy link
Member

Closing as not related

@dinvlad
Copy link

dinvlad commented Dec 29, 2021

Could you please let us know if the new protocol could be supported by this library in the future?

I'm interested because there appear to be multiple issues and security implications with the old protocol (which the new one addresses): enisdenjo/graphql-ws#3. Some of these might be due to the old protocol's implementation on the JS side (and thus not really related), but I'm curious if any still apply to this Go library.

Additionally, for JS clients, it seems since the old library has been deprecated in favor of the new one, we cannot continue using it with this Go server implementation (although we can still use the bare-bones WebSocket communication, but that can be quite a bit less user-friendly). Are there any alternatives or workarounds?

@pavelnikolov
Copy link
Member

@dinvlad, this library is 100% protocol agnostic. You could use it with any protocol you want. For the subscriptions this library uses golang channels. This means that it is up to you how to handle the communication with the client. Feel free to create a custom middleware that would upgrade HTTP connections to WebSocket protocol or any other protocol. This project is just a reference implementation with the WS + Go + graph-gophers/graphql-go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants