-
-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…3529) * fix: Fix an issue preventing typing `root` with `strawberry.Parent` Fixes strawberry-graphql/strawberry-django#538 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
6e790c1
commit c78c30f
Showing
3 changed files
with
112 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Release type: patch | ||
|
||
This release fixes a typing issue where trying to type a `root` argument with | ||
`strawberry.Parent` would fail, like in the following example: | ||
|
||
```python | ||
import strawberry | ||
|
||
|
||
@strawberry.type | ||
class SomeType: | ||
@strawberry.field | ||
def hello(self, root: strawberry.Parent[str]) -> str: | ||
return "world" | ||
``` | ||
|
||
This should now work as intended. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters