API Reference

strawberry-graphql

Code-first GraphQL library for Python with type hints, async resolvers, data loaders, and schema federation.

Official Documentation ↗
CompatibilityThis documentation covers version v0.236. Check the official docs for the latest API surface.

Installation

pippip install strawberry-graphql

Methods

strawberry-graphql is code-first graphql library for python with type hints, async resolvers, data loaders, and schema federation. This page documents the core methods, installation, and common usage patterns for the current stable release.

Installation

Install strawberry-graphql with your preferred package manager using the command shown in the frontmatter. The package is published to the Python Package Index and ships with TypeScript types where applicable.

Core methods

The methods listed in the frontmatter cover the primary API surface. Each signature reflects the v0.236 release. Consult the official documentation linked in sourceUrl for advanced options, edge cases, and breaking changes between major versions.

Frequently asked questions

The faq section in the frontmatter answers the most common questions about strawberry-graphql, including comparisons with alternatives, configuration tips, and runtime requirements. If your question is not covered, check the source URL for the full guide.

API reference evidence

Fetched from official sources on 2026-11-08T16:03:08.4363995+08:00 via WebFetch 官方文档站(/docs、/docs/api 均无 API reference);签名取自官方仓库 strawberry 源码 docstring.

FAQ

Is it async-compatible?
Yes. Use async def resolvers; Strawberry integrates with asyncio and ASGI frameworks.
Does it support federation?
Yes. Use strawberry.federation to define entities and extend types across services.
Can I use it with FastAPI?
Yes. Use strawberry.fastapi.GraphQLRouter to mount the schema on a FastAPI app.