Skip to content

Commit fb7a4bd

Browse files
committed
feat: field's description can be set by adding description="..." argument in field similar to graphql
1 parent 7b3bd08 commit fb7a4bd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

graphene_mongo/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ def get_field_description(field, registry=None):
7979
parts.append(field.verbose_name.title())
8080
if hasattr(field, "help_text"):
8181
parts.append(field.help_text)
82+
if hasattr(field, "description"):
83+
parts.append(field.description)
8284
if field.db_field != field.name:
8385
name_format = "(%s)" if parts else "%s"
8486
parts.append(name_format % field.db_field)

0 commit comments

Comments
 (0)