strawberry.GraphQLView.dispatch_request()
is typed as returning flask.Request
, which is much more restrictive than the superclass method return type:
Union[Response, str, bytes, Dict[str, Any], Iterator[str], Iterator[bytes], Tuple[Union[Response, str, bytes, Dict[str, Any], Iterator[str], Iterator[bytes]], Union[Headers, Dict[str, Union[str, List[str], Tuple[str, β¦]]], List[Tuple[str, Union[str, List[str], Tuple[str, β¦]]]]]], Tuple[Union[Response, str, bytes, Dict[str, Any], Iterator[str], Iterator[bytes]], int], Tuple[Union[Response, str, bytes, Dict[str, Any], Iterator[str], Iterator[bytes]], int, Union[Headers, Dict[str, Union[str, List[str], Tuple[str, β¦]]], List[Tuple[str, Union[str, List[str], Tuple[str, β¦]]]]]], WSGIApplication]
This is inconvenient when subclassing GraphQLView
to, say, conditionally redirect()
as that function returns a werkzeug.wrappers.Response
that isn't compatible with flask.Response
.
I think that it would be best to inherit the return type from the parent class.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too