Skip to content

Commit

Permalink
Release 🍓 0.93.23
Browse files Browse the repository at this point in the history
  • Loading branch information
botberry committed Jan 11, 2022
1 parent 7565bf9 commit 9ed685e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 25 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
CHANGELOG
=========

0.93.23 - 2022-01-11
--------------------

Improve typing of `@strawberry.enum()` by:

1. Using a `TypeVar` bound on `EnumMeta` instead of `EnumMeta`, which allows
type-checkers (like pyright) to detect the fields of the enum being
decorated. For example, for the following enum:

```python
@strawberry.enum
class IceCreamFlavour(Enum):
VANILLA = "vanilla"
STRAWBERRY = "strawberry"
CHOCOLATE = "chocolate"
```

Prior to this change, pyright would complain if you tried to access
`IceCreamFlavour.VANILLA`, since the type information of `IceCreamFlavour` was
being erased by the `EnumMeta` typing .

2. Overloading it so that type-checkers (like pyright) knows in what cases it
returns a decorator (when it's called with keyword arguments, e.g.
`@strawberry.enum(name="IceCreamFlavor")`), versus when it returns the
original enum type (without keyword arguments.

Contributed by [Tim Joseph Dumol](https://github.com/TimDumol) [PR #1568](https://github.com/strawberry-graphql/strawberry/pull/1568/)


0.93.22 - 2022-01-09
--------------------

Expand Down
24 changes: 0 additions & 24 deletions RELEASE.md

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "strawberry-graphql"
packages = [ { include = "strawberry" } ]
version = "0.93.22"
version = "0.93.23"
description = "A library for creating GraphQL APIs"
authors = ["Patrick Arminio <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 9ed685e

Please sign in to comment.