FastAPI

Strawberry provides support for FastAPI with the ASGI integration.

See below example for integrating FastAPI with Strawberry:

from fastapi import FastAPI
from strawberry.asgi import GraphQL
from api.schema import schema
graphql_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

Was this helpful?

Edit on Github

Newsletter 💌

Do you want to receive the latest updates on Strawberry? Subscribe to our newsletter!