Skip to content

Commit

Permalink
More tmp tests
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick91 committed Dec 12, 2024
1 parent cbe6fba commit 8fb12e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/benchmarks/test_execute_with_extensions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import asyncio
from inspect import isawaitable
from pathlib import Path
from typing import Any, Dict, List

Expand All @@ -20,7 +21,7 @@ def get_results(self) -> AwaitableOrValue[Dict[str, Any]]:
class ResolveExtension(SchemaExtension):
async def resolve(self, _next, root, info, *args: Any, **kwargs: Any) -> Any:
result = _next(root, info, *args, **kwargs)
if _next._is_async: # type: ignore
if (hasattr(_next, "_is_async") and _next._is_async) or isawaitable(result):
result = await result
return result

Expand Down

0 comments on commit 8fb12e7

Please sign in to comment.