python-graphql-client icon indicating copy to clipboard operation
python-graphql-client copied to clipboard

How to stop asyncio subscribe request?

Open steeljardas opened this issue 4 years ago • 1 comments

I need help, so I'm connecting to a websocket with Python GraphQL Client.

ws = GraphqlClient(endpoint='wss://wax.dfuse.eosnation.io/graphql', headers=headers)
asyncio.run(ws.subscribe(query=query, handle=callback, headers=headers))

It's working flawlessly, the only issue is that, it simply stops streaming the data after 3 minutes(due to how the API works) so I need to reconnect somehow. I need to have a way to get asyncio to stop running once no data has been returned after a while or something like that so that the loop can run again and reconnect, is there a way to do this?

steeljardas avatar Jul 14 '21 19:07 steeljardas

Also is there a parameter/argument for using proxies in the socket connection?

steeljardas avatar Jul 14 '21 22:07 steeljardas