You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using GraphQLRouter for fastapi version 0.89.0 fails.
This is due to tiangolo/fastapi#5857 .
Describe the Bug
In fastapi 0.89.0, it automatically parses response_class from the router function return type (tiangolo/fastapi#1436).
However, fastapi has a bug (tiangolo/fastapi#5857) which it cannot accept starlette.responses.* classes when it should.
BTW, there was a fix and a release in FastAPI to have special handling when the type annotation is a Response, to avoid all the Pydantic validation, etc. So this should now work normally without problems. You probably already noticed, but as I just saw this issue linked from the original PR I wanted to come and comment that here. 🤓
Using
GraphQLRouter
for fastapi version 0.89.0 fails.This is due to tiangolo/fastapi#5857 .
Describe the Bug
In fastapi 0.89.0, it automatically parses
response_class
from the router function return type (tiangolo/fastapi#1436).However, fastapi has a bug (tiangolo/fastapi#5857) which it cannot accept
starlette.responses.*
classes when it should.Strawberry-graphql's
strawberry/strawberry/fastapi/router.py
Line 164 in db81482
starlette.responses.Response
as return type. Therefore an error is raised.Maybe remove the return type for now?
Upvote & Fund
The text was updated successfully, but these errors were encountered: