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
If you try to build an ObjectType and InputObjectType for pydantic models with the same enum, it tries to create the same enum twice. (This is not an issue with re-using the same enum in multiple ObjectTypes though.)
95 _type = map[type._meta.name]
96 if isinstance(_type, GrapheneGraphQLType):
---> 97 assert _type.graphene_type == type, (
98 "Found different types with the same name in the schema: {}, {}."
99 ).format(_type.graphene_type, type)
AssertionError: Found different types with the same name in the schema: Color, Color.
The workaround is just to manually define the enum type, but thought it would be helpful to know.
If you try to build an ObjectType and InputObjectType for pydantic models with the same enum, it tries to create the same enum twice. (This is not an issue with re-using the same enum in multiple ObjectTypes though.)
Here's a reproducible example:
And the error:
The workaround is just to manually define the enum type, but thought it would be helpful to know.
For others who got this error:
The text was updated successfully, but these errors were encountered: