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:
from typing import Annotated
import strawberry
Name = Annotated[
str,
strawberry.field(name="displayName", default="Anonymous"),
]
@strawberry.type
class User:
name: NameAll 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.
This release was contributed by @patrick91 in #4594