Commit 62edaec
committed
🤖 Release 0.324.2
This release fixes fields configured with `strawberry.field()` inside
`typing.Annotated`.
You can now use this syntax consistently on object types, input types, and
interfaces, including in projects that use `from __future__ import annotations`:
```python
from typing import Annotated
import strawberry
Name = Annotated[
str,
strawberry.field(name="displayName", default="Anonymous"),
]
@strawberry.type
class User:
name: Name
```
All `strawberry.field()` options are supported. Fields with `default` or
`default_factory` can be omitted when creating an instance, and field
configuration can be combined with other Strawberry metadata such as named
unions.
[skip ci]1 parent 9f9e840 commit 62edaec
4 files changed
Lines changed: 36 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
4 | 38 | | |
5 | 39 | | |
6 | 40 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments