If I implement the following construct:
# graphql/file.py
if TYPE_CHECKING:
from graphql.status import StatusesResult
@strawberry.type
class File:
statuses: Annotated[
"StatusesResult", strawberry.lazy("graphql.status")
]
# graphql/status.py
@strawberry.type
class Status:
name: str
@strawberry.type
class Statuses:
statuses: list[Status]
StatusesResult = Annotated[
Union[Statuses, PermissionProblem],
strawberry.union("StatusesResult"),
]
I get this error when compiling:
TypeError: File fields cannot be resolved. Unexpected type 'typing.Annotated[typing.Union[graphql.status.Statuses, graphql.problem.PermissionProblem], <strawberry.union.StrawberryUnion object at 0x00000152A836DD10>]'
Have I implemented something incorrectly or is the support simply not yet available?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too