Skip to content

Commit

Permalink
feat: field's description can be set by adding description="..." argu…
Browse files Browse the repository at this point in the history
…ment in field similar to graphql
  • Loading branch information
mak626 committed Jun 21, 2024
1 parent b94f660 commit cd132a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions graphene_mongo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ def get_field_description(field, registry=None):
parts.append(field.verbose_name.title())
if hasattr(field, "help_text"):
parts.append(field.help_text)
if hasattr(field, "description"):
parts.append(field.description)
if field.db_field != field.name:
name_format = "(%s)" if parts else "%s"
parts.append(name_format % field.db_field)
Expand Down

0 comments on commit cd132a7

Please sign in to comment.