Commit 153b88b
committed
🤖 Release 0.324.3
This release fixes silently ignored `strawberry.field()` metadata in nested type
annotations.
Strawberry now raises a clear error when field metadata is placed below the
class-field annotation, such as on a list item, and explains that it must be moved
to the outermost `Annotated` metadata for the field.
For example, Strawberry now reports this misplaced metadata:
```python
from typing import Annotated
import strawberry
@strawberry.type
class Query:
names: list[Annotated[str, strawberry.field(description="A name")]]
```
Move `strawberry.field()` to the field's outermost `Annotated` metadata:
```python
@strawberry.type
class Query:
names: Annotated[list[str], strawberry.field(description="The names")]
```
[skip ci]1 parent 4fd44aa commit 153b88b
4 files changed
Lines changed: 35 additions & 41 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 | + | |
4 | 37 | | |
5 | 38 | | |
6 | 39 | | |
| |||
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