Docs
General
Types
Guides
Editor integration
Concepts
Integrations
Operations
FastAPI
Strawberry provides support for FastAPI with the ASGI integration.
See below example for integrating FastAPI with Strawberry:
from fastapi import FastAPIfrom strawberry.asgi import GraphQL
from api.schema import schemagraphql_app = GraphQL(schema)
app = FastAPI()app.add_route("/graphql", graphql_app)app.add_websocket_route("/subscriptions", graphql_app)
For more information about Strawberry ASGI refer to asgi.md