From bfda8f68e6d8382042cfcd76559bcc2c365a2531 Mon Sep 17 00:00:00 2001 From: leonardo arroyo <[contato@leonardoarroyo.com](mailto:contato@leonardoarroyo.com)> Date: Sat, 14 Nov 2020 02:29:35 -0300 Subject: [PATCH] Use self.stdout.write instead of print when printing graphql schema --- graphene_django/management/commands/graphql_schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphene_django/management/commands/graphql_schema.py b/graphene_django/management/commands/graphql_schema.py index d06f4d8..bd1c8e6 100644 --- a/graphene_django/management/commands/graphql_schema.py +++ b/graphene_django/management/commands/graphql_schema.py @@ -63,7 +63,7 @@ class Command(CommandArguments): if out == "-" or out == "-.json": self.stdout.write(json.dumps(schema_dict, indent=indent, sort_keys=True)) elif out == "-.graphql": - print(print_schema(schema)) + self.stdout.write(print_schema(schema)) else: # Determine format _, file_extension = os.path.splitext(out)