Reimplement juniper_actix::subscritions via actorless actix-ws crate instead of the current actix-web-actors::ws one. The whole thing with actors cooperates very badly with juniper_graphql_ws state machine, introducing too excessive polling, which leads to panics and abnormal WebSocket closures instead of normal ones. It also gives a feeling of fighting with actors, trying to pair them with Stream/Sink, instead of easing it. So, the actorless actix-ws crate should go just fine, as we have in the juniper_warp crate.
Also, WebSocket connections are not closed normally in juniper_actix, due to panics:
Solution
Get rid of actix-web-actors::ws and use actix-ws crate instead.
Now, WebSocket connections are closing as expected:
Additionally
Fixes some issues with the graphql-transport-ws implementation, regarding panicking for edge cases in polling.
Adds juniper::http integration tests for graphql-transport-ws as well.
Follows #1191, #1186
Motivation
See https://github.com/graphql-rust/juniper/issues/1186#issuecomment-1730323445:
Also, WebSocket connections are not closed normally in
juniper_actix
, due to panics:Solution
Get rid of
actix-web-actors::ws
and useactix-ws
crate instead.Now, WebSocket connections are closing as expected:
Additionally
graphql-transport-ws
implementation, regarding panicking for edge cases in polling.juniper::http
integration tests forgraphql-transport-ws
as well.