add_route
types missing one use case
#2635
Answered
by
Kludex
patrick91
asked this question in
Potential Issue
-
Hi there! In Strawberry we have an ASGI view that can be used with Starlette, like this from starlette.applications import Starlette
from strawberry.asgi import GraphQL
from api.schema import schema
graphql_app = GraphQL(schema)
app = Starlette()
app.add_route("/graphql", graphql_app) This route is a callable that accepts starlette/starlette/applications.py Line 161 in 6f863b0 is this expected? if not I'm happy to send a PR to update the types :) |
Beta Was this translation helpful? Give feedback.
Answered by
Kludex
Jul 5, 2024
Replies: 1 comment 2 replies
-
It is expected. Why is the app not mounted? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't think so... But on the docs, you can just have the "mount" as follows:
Or even better: