Skip to content

Commit 0dc7b09

Browse files
committed
refactor: remove Optional from execute_operation return type
Replicates graphql/graphql-js@35bc6a5
1 parent abaa127 commit 0dc7b09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/graphql/execution/execute.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def build_response(
334334

335335
def execute_operation(
336336
self, operation: OperationDefinitionNode
337-
) -> Optional[AwaitableOrValue[Any]]:
337+
) -> AwaitableOrValue[Any]:
338338
"""Execute an operation.
339339
340340
Implements the "Executing operations" section of the spec.
@@ -1033,7 +1033,7 @@ def execute(
10331033
# noinspection PyShadowingNames
10341034
async def await_result() -> Any:
10351035
try:
1036-
return build_response(await result, errors) # type: ignore
1036+
return build_response(await result, errors)
10371037
except GraphQLError as error:
10381038
errors.append(error)
10391039
return build_response(None, errors)

0 commit comments

Comments
 (0)