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

Support new graphql-ws subprotocol #38

Open
Quantumplation opened this issue Oct 6, 2022 · 8 comments
Open

Support new graphql-ws subprotocol #38

Quantumplation opened this issue Oct 6, 2022 · 8 comments

Comments

@Quantumplation
Copy link

At some point, the graphql community made the breaking change to switch to a new websocket subprotocol; What was previously called the graphql-ws subprotocol is now called graphql-transport-ws. N.B. Confusingly, the standard library implementing this in the js world is called graphql-ws, making this non-trivial to track down, as I kept thinking that graphql-ws was the more modern one.

It would be super helpful to support the new spec.

See:
https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws
https://github.com/enisdenjo/graphql-ws/tree/master/docs
https://github.com/enisdenjo/graphql-ws/blob/d44c6f18ccd2bc539bb541e6bfd1bf0c769c7856/src/common.ts#L10-L15

@pavelnikolov
Copy link
Member

@Quantumplation this would indeed be very helpful. PRs are more than welcome.

@Quantumplation
Copy link
Author

@pavelnikolov Super swamped with work right now, but I might have some spare time in a week or two!

@andig
Copy link

andig commented Jan 4, 2023

Cross-ref hasura/go-graphql-client#38. As of now I'm totally lost with old vs new. Seems the Go landscape has server, but is missing client support for the "new" graphql-ws from what I understand?

@mikhailv
Copy link

mikhailv commented Apr 5, 2023

I have adapted implementation of graphql from gqlgen for graph-gophers. Just finished and tested just a little, but it works for me. Will do some additional testing tomorrow.

https://github.com/mikhailv/graphql-transport-ws

@andig
Copy link

andig commented Apr 5, 2023

https://github.com/hasura/go-graphql-client meanwhile has support, too.

@mikhailv
Copy link

mikhailv commented Apr 5, 2023

https://github.com/hasura/go-graphql-client meanwhile has support, too.

@andig but this this client only library, right? Not server websocket handler for gophers graphql?

@annibuliful
Copy link

Any progress for this issue
I'm a newbie in golang

@pavelnikolov
Copy link
Member

Note that I am aware of.

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

5 participants