python-graphql-client
python-graphql-client copied to clipboard
How to stop asyncio subscribe request?
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?
Also is there a parameter/argument for using proxies in the socket connection?