Ariadne
A schema-first Python GraphQL library: you write the schema in SDL and bind plain Python functions to its fields.
- What it is
- API frameworks (graphql libraries)
- Part of
- Built on GraphQL-core
- Type
- Open source
- Made by
- Mirumee
- License
- BSD 3-Clause
- Facts checked
- 9 October 2026
What it is
In Ariadne the schema is text. You write it in GraphQL’s Schema Definition Language (SDL), as a Python string or in .graphql files, and optionally wrap it in gql() so a syntax error points at your schema rather than at Ariadne’s internals. Resolvers are plain functions. You attach them with bindables: a QueryType or ObjectType("Book") object whose @query.field("book") decorator names the field a function resolves. make_executable_schema(type_defs, query, book) parses the SDL into a GraphQL-core schema and binds each function to its field, raising ValueError if a bindable names a type or field the schema doesn’t define. A field with no bound resolver falls back to GraphQL-core’s default resolver, which reads the key or attribute of the same name from the parent object. A resolver gets the parent object, an info object whose context holds the request, and the field’s arguments as keyword arguments; convert_names_case=True maps camelCase names in the schema to snake_case in Python.
ariadne.asgi.GraphQL is an ASGI application, built on Starlette, that serves queries over HTTP and subscriptions over WebSockets, with a GraphiQL explorer built in; a WSGI version exists too. In FastAPI you either mount it as a sub-application or call its handle_request() from your own routes, which lets FastAPI dependencies such as a database session reach the GraphQL context. Mirumee, a software company, created it in 2018 and kept it on 0.x versions until 1.0.0 in March 2026; it follows SemVer since. Version 1.1.0 (June 2026) added an automated SQLAlchemy integration, and 1.1.1 (October 7, 2026) added support for GraphQL-core 3.3.
Why teams pick it
- The SDL is the contract: frontend and backend developers read and review the same schema, and GraphQL tools work on it directly
- Small API of plain functions and bindables, with no global registry, so one codebase can serve several GraphQL APIs
- ASGI and WSGI servers, subscriptions, file uploads, Apollo Federation and integrations for Django, FastAPI, Flask and Starlette
- Bindables are checked at startup: binding a resolver to a type or field the schema lacks raises an error
Watch out for
- Two sources of truth: the schema is SDL and the code is Python, connected by field names in strings. A field you forget to bind silently uses the default resolver and returns
nullif the parent has no matching key or attribute - The SDL’s camelCase meets Python’s snake_case; conversion is opt-in with
convert_names_case - In FastAPI it runs as a mounted ASGI app, so using FastAPI dependencies means writing the GET, POST and WebSocket routes by hand
More of the GraphQL-core family
What all graphql libraries have in common →
GrapheneOpen sourceBuilt on itThe oldest Python GraphQL library: code first, with its own field classes such as `graphene.String` and a `resolve_` method per field.
Strawberry GraphQLOpen sourceBuilt on itA code-first Python GraphQL library: you write dataclass-style classes with type hints, and Strawberry turns them into the schema.How it fits with other technologies
The same book query, schema first: SDL plus a bound resolver · python
# pip install ariadne (1.1.1, Python 3.10+)
from ariadne import QueryType, graphql_sync, make_executable_schema
type_defs = """
type Query {
book: Book
}
type Book {
title: String!
author: String!
}
"""
query = QueryType()
@query.field("book")
def resolve_book(obj, info):
# A dict is fine: the default resolver reads book["title"]
return {"title": "Dune", "author": "Frank Herbert"}
schema = make_executable_schema(type_defs, query)
success, result = graphql_sync(schema, {"query": "{ book { title author } }"})
print(success, result)
# True {'data': {'book': {'title': 'Dune', 'author': 'Frank Herbert'}}}
# Serve it from FastAPI:
# from ariadne.asgi import GraphQL
# from fastapi import FastAPI
# app = FastAPI()
# app.mount("/graphql/", GraphQL(schema))See it in a real stack
No architecture uses Ariadne yet. Drop it into the playground and wire it up yourself.Open playground →Where it came from2018–2026
In 2018 the main Python option for GraphQL was Graphene, which builds the schema from Python classes. Mirumee wanted the schema-first style of the JavaScript server Apollo Server, where the SDL is written by hand and resolvers are attached to it. It released Ariadne 0.1.0 in October 2018, “inspired by Apollo Server and built with GraphQL-core”, after dogfooding it internally on a number of projects.
Two early changes set its shape. Version 0.2.0 (January 2019) moved to GraphQL-core-next, which supported async resolvers and a more recent version of the spec. Version 0.3.0 (April 2019) added an ASGI interface based on Starlette, which is how it now runs in Starlette and FastAPI. Ariadne then stayed on 0.x versions, up to 0.29, until 1.0.0 in March 2026 removed deprecated features such as Apollo tracing and OpenTracing support. Version 1.1.0 (June 2026) added an automated SQLAlchemy integration, and 1.1.1 (October 2026) supports GraphQL-core 3.3.
Why it’s built this way
- Schema first, like Apollo Server
- The SDL is the approach most of the GraphQL community uses, and dozens of frontend and backend tools, examples and learning resources work with it. Writing the schema by hand makes all of that available to Python teams too.
- Bindables instead of a global registry
- Resolvers attach to the schema through explicit objects passed to
make_executable_schema, with no global state, so several GraphQL APIs can live in one codebase and reuse types explicitly. - Move to GraphQL-core-next early
- GraphQL-core 2 didn’t support
asyncresolvers or the newer spec. Switching in January 2019 gave Ariadneasyncresolvers and query execution, three months before it added an ASGI server.
Timeline
- 2018
0.1.0 released by Mirumee in October
- 2019
Moves to GraphQL-core-next for
asyncresolvers in January - 2019
ASGI interface built on Starlette in April
- 2026
1.0.0 in March; SQLAlchemy integration in June; GraphQL-core 3.3 support in October
- GitHub: Ariadne 0.1.0 README (inspired by Apollo Server, built with GraphQL-core, dogfooded internally)
- PyPI: ariadne release history (0.1.0 in October 2018, 1.0.0 in March 2026)
- GitHub: Ariadne changelog to 0.4.0 (0.2.0 GraphQL-core-next, 0.3.0 ASGI on Starlette)
- GitHub release: Ariadne 1.0.0 (March 2026)
- GitHub release: Ariadne 1.1.0 (June 2026)
- GitHub release: Ariadne 1.1.1 (October 2026)
- PyCon DE 2019: Strawberry talk transcript (Graphene was the only Python library until 2018)
- GitHub: mirumee/ariadne README (schema-first rationale, no global state)
- Graphene docs: Getting started (Apollo Server and Ariadne as schema-first examples)
Sources9 · facts checked 9 October 2026
- GitHub: mirumee/ariadne README (features, Python 3.10 to 3.14, SemVer)
- GitHub: mirumee/ariadne LICENSE (BSD 3-Clause)
- Ariadne docs: Introduction (SDL, gql, resolvers, QueryType)
- Ariadne docs: Resolvers (keyword arguments, default resolver)
- Ariadne docs: Bindables (ValueError for undefined types or fields)
- Ariadne docs: Name case conversion
- Ariadne docs: FastAPI integration (mount, or handle_request from routes)
- PyPI: ariadne 1.1.1 (depends on graphql-core and Starlette)
- FastAPI docs: GraphQL (Ariadne listed with ASGI support)