-
-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix Annotated + strawberry.lazy + deferred annotations (#3507)
* fix: Fix Annotated + strawberry.lazy + deferred annotations Fix #3491 * [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
fc322a8
commit 8b30e07
Showing
5 changed files
with
106 additions
and
12 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,21 @@ | ||
Release type: patch | ||
|
||
This release fixes an issue when using `Annotated` + `strawberry.lazy` + | ||
deferred annotations such as: | ||
|
||
```python | ||
from __future__ import annotations | ||
import strawberry | ||
from typing import Annotated | ||
|
||
|
||
@strawberry.type | ||
class Query: | ||
a: Annotated["datetime", strawberry.lazy("datetime")] | ||
|
||
|
||
schema = strawberry.Schema(Query) | ||
``` | ||
|
||
Before this would only work if `datetime` was not inside quotes. Now it should | ||
work as expected! |
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
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