Use self.stdout.write instead of print when printing graphql schema

This commit is contained in:
leonardo arroyo 2020-11-14 02:29:35 -03:00
parent 4b8db68d5a
commit bfda8f68e6

View File

@ -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)