INNER CODE UNIT · Python
__init__
psevensas/DjangoChannelsGraphqlWs · channels_graphql_ws/client.py:64
def __init__(
self,
transport: _transport.GraphqlWsTransport,
subprotocol="graphql-transport-ws",
):
"""Constructor."""
assert isinstance(
transport, _transport.GraphqlWsTransport
), "Given transport does not implement the 'GraphqlWsTransport' interface!"
self._transport = transport
self._is_connected = False
assert subprotocol in (
"graphql-transport-ws",
"graphql-ws",
), "Client supports only graphql-transport-ws and graphql-ws subprotocols!"
self._subprotocol = subprotocol
@property