mst-gql icon indicating copy to clipboard operation
mst-gql copied to clipboard

Replace subscriptions-transport-ws with graphql-ws

Open theonetheycallneo opened this issue 3 years ago • 7 comments

The subscriptions-transport-ws library is not being actively maintained. It is recommended that you use the graphql-ws library instead. For details read the GraphQL over WebSockets announcement.

Reference: https://github.com/apollographql/subscriptions-transport-ws#graphql-ws

New GraphQL WebSocket library: https://github.com/enisdenjo/graphql-ws

theonetheycallneo avatar May 26 '21 17:05 theonetheycallneo

This would be a breaking change, but I think it is a good idea. What do you think, @jesse-savary?

beepsoft avatar Mar 24 '22 08:03 beepsoft

I think this is a good idea; I'd like to review existing dependencies and replace things as needed.

jesse-savary avatar Mar 24 '22 19:03 jesse-savary

would it be possible to allow use of other libs instead? there's a big push to leave websockets in favour of other means of communication (mercure for example).

krstns avatar May 04 '22 06:05 krstns

I haven't seen this happening. Where is this push coming from? Who is using mercure in the context of graphql subscriptions? For now I see graphql-ws as a safe option.

beepsoft avatar May 04 '22 06:05 beepsoft

api-platform for one. I'm not saying that as part of mst-gql you would integrate mercure, just to create an option to use other libs.

krstns avatar May 04 '22 06:05 krstns

Oh, you mean to make the "backend" for subscriptions selectable? We vould then keep subscriptions-transport-ws for backward compatibility and add new backends like graphql-ws and mercure.

beepsoft avatar May 04 '22 08:05 beepsoft

yes, i don't expect this to be in the scope of the 'mst-gql' project but it would allow us to add custom implementations and then just call back to the root with the update to follow the same set of processes.

krstns avatar May 10 '22 11:05 krstns