From cfb6246e52a99df886b3b3eaf9dcf30768ce315a Mon Sep 17 00:00:00 2001 From: D1plo1d Date: Wed, 31 Mar 2021 19:40:32 -0400 Subject: [PATCH 1/2] fix: Close, Ping, and Pong websocket messages should not be parsed as GraphQL --- integrations/warp/src/subscription.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/integrations/warp/src/subscription.rs b/integrations/warp/src/subscription.rs index ef73c051..7b71df6c 100644 --- a/integrations/warp/src/subscription.rs +++ b/integrations/warp/src/subscription.rs @@ -100,6 +100,9 @@ where ws_receiver .take_while(|msg| future::ready(msg.is_ok())) .map(Result::unwrap) + .filter(|msg | { + future::ready(msg.is_text() || msg.is_binary()) + }) .map(ws::Message::into_bytes), initializer, protocol, From e6da885093994c0c2df9af7f6b6d55c8908ae8e2 Mon Sep 17 00:00:00 2001 From: D1plo1d Date: Wed, 31 Mar 2021 20:57:39 -0400 Subject: [PATCH 2/2] Fixed code formatting --- integrations/warp/src/subscription.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/integrations/warp/src/subscription.rs b/integrations/warp/src/subscription.rs index 7b71df6c..a6b5cb74 100644 --- a/integrations/warp/src/subscription.rs +++ b/integrations/warp/src/subscription.rs @@ -100,9 +100,7 @@ where ws_receiver .take_while(|msg| future::ready(msg.is_ok())) .map(Result::unwrap) - .filter(|msg | { - future::ready(msg.is_text() || msg.is_binary()) - }) + .filter(|msg| future::ready(msg.is_text() || msg.is_binary())) .map(ws::Message::into_bytes), initializer, protocol,