gqlactioncable 0.0.2

Creator: rpa-with-ash

Last updated:

Add to Cart

Description:

gqlactioncable 0.0.2

gql-actioncable
This is a graphql-python/gql transport
for the ActionCable websockets protocol.
Installation
You can install the transport with:
pip install gqlactioncable

Usage
Here is an example using the sorare.com GraphQL websockets backend:
import asyncio

from gql import Client, gql

from gqlactioncable import ActionCableWebsocketsTransport


async def main():

transport = ActionCableWebsocketsTransport(
url="wss://ws.sorare.com/cable",
)

async with Client(transport=transport) as session:

subscription = gql(
"""
subscription onAnyCardUpdated {
aCardWasUpdated {
slug
}
}
"""
)

async for result in session.subscribe(subscription):
print(result)


asyncio.run(main())

License
MIT License

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.