Using nested generics causes an invalid DuplicatedTypeName
exception to be raised when using the same type twice.
from typing import Generic, TypeVar
import strawberry
T = TypeVar("T")
@strawberry.type
class Wrapper(Generic[T]):
value: T
@strawberry.type
class Query:
a: Wrapper[Wrapper[int]]
b: Wrapper[Wrapper[int]]
schema = strawberry.Schema(query=Query)
strawberry.exceptions.duplicated_type_name.DuplicatedTypeName:
Type IntWrapperWrapper is defined multiple times in the schema
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