We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d18a010 commit b59133cCopy full SHA for b59133c
graphene_pydantic/converters.py
@@ -97,6 +97,9 @@ def convert_pydantic_field(
97
to the generated Graphene data model type.
98
"""
99
declared_type = getattr(field, "annotation", None)
100
+ # Convert Python 11 UnionType to T.Union
101
+ if isinstance(declared_type, UnionType):
102
+ declared_type = T.Union[declared_type.__args__]
103
field_kwargs.setdefault(
104
"type" if GRAPHENE2 else "type_",
105
convert_pydantic_type(
0 commit comments