We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72d491d commit 8445229Copy full SHA for 8445229
python_graphql_client/graphql_client.py
@@ -92,13 +92,17 @@ async def subscribe(
92
)
93
94
async with websockets.connect(
95
- self.endpoint, subprotocols=["graphql-ws"]
+ self.endpoint,
96
+ subprotocols=["graphql-ws"],
97
+ extra_headers=self.__request_headers(headers)
98
) as websocket:
99
await websocket.send(connection_init_message)
100
await websocket.send(request_message)
101
async for response_message in websocket:
102
response_body = json.loads(response_message)
103
if response_body["type"] == "connection_ack":
104
logging.info("the server accepted the connection")
105
+ elif response_body["type"] == "ka":
106
+ logging.info("the server sent a keep alive message")
107
else:
108
handle(response_body["payload"])
0 commit comments