File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ def on_operation(self) -> Iterator[None]:
5656
5757 if isinstance (result , ExecutionResult ):
5858 self ._process_result (result )
59- else :
59+ elif result :
6060 self ._process_result (result .initial_result )
6161
6262
Original file line number Diff line number Diff line change 11from typing import Union
22
33from graphql .execution import ExecutionContext as GraphQLExecutionContext
4- from graphql .execution import ExecutionResult as GraphQLExecutionResult
4+ from graphql .execution import ExecutionResult as OriginalGraphQLExecutionResult
55from graphql .execution import execute , subscribe
66
77from strawberry .types import ExecutionResult
2525 )
2626
2727 GraphQLExecutionResult = Union [
28- GraphQLExecutionResult , InitialIncrementalExecutionResult
28+ OriginalGraphQLExecutionResult , InitialIncrementalExecutionResult
2929 ]
3030
3131except ImportError :
3232 GraphQLIncrementalExecutionResults = type (None )
33+ GraphQLExecutionResult = OriginalGraphQLExecutionResult # type: ignore
3334
3435 incremental_execution_directives = () # type: ignore
3536 experimental_execute_incrementally = None
3637
3738
3839# TODO: give this a better name, maybe also a better place
3940ResultType = Union [
40- GraphQLExecutionResult ,
41+ OriginalGraphQLExecutionResult ,
4142 GraphQLIncrementalExecutionResults ,
4243 ExecutionResult ,
4344]
4445
4546__all__ = [
4647 "GraphQLExecutionContext" ,
48+ "GraphQLExecutionResult" ,
4749 "GraphQLIncrementalExecutionResults" ,
4850 "ResultType" ,
4951 "execute" ,
Original file line number Diff line number Diff line change @@ -546,7 +546,7 @@ async def _handle_execution_result(
546546 if isinstance (result , GraphQLExecutionResult ):
547547 result = ExecutionResult (data = result .data , errors = result .errors )
548548 result .extensions = await extensions_runner .get_extensions_results (context )
549- context .result = result # type: ignore # mypy failed to deduce correct type.
549+ context .result = result
550550 return result
551551
552552 async def execute (
You can’t perform that action at this time.
0 commit comments