Skip to content

Commit

Permalink
Fix comments and release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
shmoon-kr committed Aug 18, 2024
1 parent d4ed01d commit fa7e98a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Release type: patch

Fix a bug ''a custom resolver with permission_classes doesn't accept @sync_to_async decorator"
Fix a bug "StrawberryResolver.is_async returns False for a function decorated by @sync_to_async"
The root cause was inspect.iscoroutinefunction() function returns True only for functions defined with "async def" in python < 3.12
2 changes: 1 addition & 1 deletion strawberry/types/fields/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def is_reserved_type(self, other: builtins.type) -> bool:

T = TypeVar("T")

# asyncio.iscoroutinefunction was deprecated in python >= 3.12
# inspect.iscoroutinefunction returns True for a function decorated by @sync_to_async in python >= 3.12
if hasattr(inspect, "markcoroutinefunction"):
iscoroutinefunction = inspect.iscoroutinefunction

Check warning on line 177 in strawberry/types/fields/resolver.py

View check run for this annotation

Codecov / codecov/patch

strawberry/types/fields/resolver.py#L177

Added line #L177 was not covered by tests
else:
Expand Down

0 comments on commit fa7e98a

Please sign in to comment.