Skip to content

Commit cd63a9f

Browse files
support more str based pydantic types
1 parent 40f1a67 commit cd63a9f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

graphene_pydantic/converters.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ def find_graphene_type(
193193
)
194194
elif issubclass(type_, enum.Enum):
195195
return Enum.from_enum(type_)
196+
elif issubclass(type_, str):
197+
return String
196198
else:
197199
raise ConversionError(
198200
f"Don't know how to convert the Pydantic field {field!r} ({field.type_})"

0 commit comments

Comments
 (0)