strawberry icon indicating copy to clipboard operation
strawberry copied to clipboard

Generic types with scalars use the python type name.

Open coady opened this issue 2 years ago • 0 comments

Describe the Bug

Generic types follow a naming convention of prepending the variable name to the type name. But when the variable is a builtin scalar, it's using the name of the python class, instead of the corresponding GraphQL scalar.

@strawberry.type
class Output(Generic[T]):
    data: T

Output[str] # resolves to StrOutput instead of StringOutput

System Information

0.113

coady avatar May 21 '22 16:05 coady