graphql-transport-ws icon indicating copy to clipboard operation
graphql-transport-ws copied to clipboard

Support new graphql-ws subprotocol

Open Quantumplation opened this issue 3 years ago • 8 comments

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

Quantumplation avatar Oct 06 '22 07:10 Quantumplation

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

pavelnikolov avatar Oct 11 '22 09:10 pavelnikolov

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

Quantumplation avatar Oct 12 '22 14:10 Quantumplation

Cross-ref https://github.com/hasura/go-graphql-client/issues/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?

andig avatar Jan 04 '23 18:01 andig

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

mikhailv avatar Apr 05 '23 00:04 mikhailv

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

andig avatar Apr 05 '23 06:04 andig

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?

mikhailv avatar Apr 05 '23 08:04 mikhailv

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

annibuliful avatar Feb 13 '24 02:02 annibuliful

Note that I am aware of.

pavelnikolov avatar Feb 13 '24 12:02 pavelnikolov