Skip to content

Commit 2244717

Browse files
authored
Merge pull request #67 from process0/process0-model-docstring
Copy pydantic model docstring to graphene model
2 parents 617089d + 4580929 commit 2244717

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

graphene_pydantic/objecttype.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ def __init_subclass_with_meta__(
8686
if not registry:
8787
registry = get_global_registry(PydanticObjectType)
8888

89+
if not cls.__doc__:
90+
cls.__doc__ = model.__doc__
91+
8992
pydantic_fields = yank_fields_from_attrs(
9093
construct_fields(
9194
obj_type=cls,

0 commit comments

Comments
 (0)