You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like this! We would need some sort of a registry to ensure we don't duplicate enums across types, but other than that it's a very straight-forward devX improvement.
The only "issue" I see is documentation - we need to make a decision on wether we want to include docstrings of the original python enum in the GraphQL schema, and we need to be aware that specific enum values are not annotatable with their own docstrings in python.
I like this! We would need some sort of a registry to ensure we don't duplicate enums across types, but other than that it's a very straight-forward devX improvement.
Good point! We might also think of this in the context of Strawberry Django (and other integrations)
Feature Request Type
Description
Currently to register a GraphQL Enum from an existing enums that resides elsewhere in your code base
you need to do the following ~
This results in a pyright error that can be fixed like this
It would be nice if we could just use a default GraphQL implementation of the enum on the fly
so that the
strawberry.enum
call would not be needed.Upvote & Fund
The text was updated successfully, but these errors were encountered: