Open benzolium opened 2 years ago
May be resolved by #2117 Where generics are evaluated by __getitem__(annotations)
users would be able to do:
SomeGenericTypeInt = SomeGenericType[int]
SomeGenericTypeInt._type_definition.graphql_name = "SomeGenericTypeInt"
or we would provide some helper function for renaming a type that will do this.
strawberry.tools.rename_type(SomeGenericTypeInt, "SomeGenericTypeInt")
It would be nice to rename generic types by annotating them.
E.g. with
typing.Annotated
like for arguments.My use case is to annotate generic types inside the union:
Upvote & Fund