Async GraphQL Client

An asynchronous GraphQL client for Python and asyncio — built on aiohttp / httpx and graphql-core.

PyPI Python versions Read the Docs License
pip install "aiographql-client[aiohttp,pydantic]"
poetry add "aiographql-client[aiohttp,pydantic]"

Why aiographql-client

Async-first

Built from the ground up on asyncio. No sync shim, no thread pool.

Multiple transports

aiohttp (default) and httpx. Swap freely, share sessions for production-grade connection pooling.

Subscriptions

First-class GraphQL subscriptions over WebSockets via aiohttp or websockets.

Schema validation

Client-side query validation powered by graphql-core.

Bring your own models

Decode straight into dataclasses or Pydantic models with explicit codecs.

Production-ready

Battle-tested in high-throughput async services.

Explore

Introduction

Install, quick start, and the mental model.

Getting started
Examples

Queries, mutations, subscriptions, validation, data models.

Usage Examples
Transports

aiohttp vs httpx, sessions, timeouts, retries, SOCKS proxies.

Configuring Transport
Data models

Dataclasses and Pydantic decoding patterns.

Data Models
Python API

Full reference for client, transport, data, constants, exceptions.

Python API
Contributing

Local setup, tests, conventions, release process.

Contributing