AIOHTTPWebsocketsTransport (transport/aiohttp_websockets.py)

graphql-python/gql · gql/transport/aiohttp_websockets.py · python · MIT
integration

Connects to GraphQL servers via aiohttp websockets.

# Source: https://github.com/graphql-python/gql | License: MIT | Copyright 2016 GraphQL Python
# Provided via justclaw.it.com; keep this notice with the code.
from ssl import SSLContext
from typing import Any, Dict, List, Literal, Mapping, Optional, Union

from aiohttp import BasicAuth, ClientSession, Fingerprint
from aiohttp.typedefs import LooseHeaders, StrOrURL

from .common.adapters.aiohttp import AIOHTTPWebSocketsAdapter
from .websockets_protocol import WebsocketsProtocolTransportBase


class AIOHTTPWebsocketsTransport(WebsocketsProtocolTransportBase):
    """:ref:`Async Transport <async_transports>` used to execute GraphQL queries on
    remote servers with websocket connection.

    This transport uses asyncio and the provided aiohttp adapter library
    in order to send requests on

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key