Skip to content

Commit

Permalink
Add new line before field description
Browse files Browse the repository at this point in the history
  • Loading branch information
kholodnovarrival committed May 24, 2023
1 parent 07f42ce commit 6aa406b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions graphene_federation/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ def add_entity_fields_decorators(entity, schema: Schema, string_schema: str) ->
decorator_value = getattr(f, decorator, None)
if decorator_value:
str_field += f" {decorator_resolver(schema, decorator_value)}"
if str_fields and str_field.lstrip().startswith("\"\"\""):
str_field = f"\n{str_field}"
str_fields.append(str_field)
str_fields_annotated = "\n".join(str_fields)
# Replace the original field declaration by the annotated one
Expand Down

0 comments on commit 6aa406b

Please sign in to comment.