diff --git a/src/graphql/language/block_string.py b/src/graphql/language/block_string.py index 0fa7a46b..b13bae4c 100644 --- a/src/graphql/language/block_string.py +++ b/src/graphql/language/block_string.py @@ -80,6 +80,9 @@ def is_printable_as_block_string(value: str) -> bool: if not value: return True # emtpy string is printable + if value.isprintable(): # single line without control characters or tabs + return not value.isspace() # only spaces would be a trailing empty line + is_empty_line = True has_indent = False has_common_indent = True