Skip to content

Commit 3306810

Browse files
committed
Release 🍓 0.311.0
1 parent f59030b commit 3306810

File tree

3 files changed

+36
-31
lines changed

3 files changed

+36
-31
lines changed

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,41 @@
11
CHANGELOG
22
=========
33

4+
0.311.0 - 2026-03-08
5+
--------------------
6+
7+
Enums can now be registered via `Annotated`. The preferred way is still using
8+
`@strawberry.enum` as a decorator, but when you need to expose an existing enum
9+
under a different name or alias, `Annotated` works as a proper type alias in all
10+
type checkers:
11+
12+
```python
13+
from typing import Annotated
14+
from enum import Enum
15+
import strawberry
16+
17+
18+
class IceCreamFlavour(Enum):
19+
VANILLA = "vanilla"
20+
STRAWBERRY = "strawberry"
21+
CHOCOLATE = "chocolate"
22+
23+
24+
MyIceCreamFlavour = Annotated[
25+
IceCreamFlavour, strawberry.enum(description="Ice cream flavours")
26+
]
27+
28+
29+
@strawberry.type
30+
class Query:
31+
@strawberry.field
32+
def flavour(self) -> MyIceCreamFlavour:
33+
return IceCreamFlavour.VANILLA
34+
```
35+
36+
Contributed by [Thiago Bellini Ribeiro](https://github.com/bellini666) via [PR #4293](https://github.com/strawberry-graphql/strawberry/pull/4293/)
37+
38+
439
0.310.2 - 2026-03-08
540
--------------------
641

RELEASE.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "strawberry-graphql"
3-
version = "0.310.2"
3+
version = "0.311.0"
44
description = "A library for creating GraphQL APIs"
55
authors = [{ name = "Patrick Arminio", email = "patrick.arminio@gmail.com" }]
66
license = { text = "MIT" }

0 commit comments

Comments
 (0)