mobxjs / mst-gql

Bindings for mobx-state-tree and GraphQL
MIT License
680 stars 81 forks source link

Replace subscriptions-transport-ws with graphql-ws #330

Open theonetheycallneo opened 3 years ago

theonetheycallneo commented 3 years ago

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

beepsoft commented 2 years ago

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

jesse-savary commented 2 years ago

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

krstns commented 2 years ago

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

beepsoft commented 2 years ago

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.

krstns commented 2 years ago

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.

beepsoft commented 2 years ago

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.

krstns commented 2 years ago

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.