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.
2 parents 40f1a67 + 75c59ed commit 61bb5a5Copy full SHA for 61bb5a5
graphene_pydantic/converters.py
@@ -123,7 +123,7 @@ def convert_pydantic_type(
123
# TODO: _should_ Sets remain here?
124
return List(graphene_type)
125
elif field.shape in SHAPE_MAPPING:
126
- raise ConversionError(f"Don't know how to handle mappings in Graphene.")
+ raise ConversionError("Don't know how to handle mappings in Graphene.")
127
128
129
def find_graphene_type(
@@ -193,6 +193,8 @@ def find_graphene_type(
193
)
194
elif issubclass(type_, enum.Enum):
195
return Enum.from_enum(type_)
196
+ elif issubclass(type_, str):
197
+ return String
198
else:
199
raise ConversionError(
200
f"Don't know how to convert the Pydantic field {field!r} ({field.type_})"
0 commit comments