Configuring HTTP Transport

Custom HTTP Client Sessions

The client allows you to specify a aiohttp Client Session for use at various levels. Including per query and/or for all queries made by the client.

This can be done so by passing in the session when doing any of the following;

  1. creating a client

    endpoint="", session=session
  1. making a query

await client.query(
    request=request, session=session
  1. creating a subscription

await client.subscribe(
    request=request, session=session

Using Behind SOCK Proxies

In order use via a socks proxy, you will need to custom connector, like the one provided by aiohttp-socks.

Here is an example code snippet using this library.

connector = aiohttp_socks.ProxyConnector(
async with aiohttp.ClientSession(connector=connector) as session:
    client = GraphQLClient(
        endpoint="", session=session
    await client.query(request="query { city { name } }")