Fix schema print with -.graphql

This commit is contained in:
Bendik Eger 2022-11-30 13:34:09 +01:00 committed by Firas K
parent 0beb3385df
commit 1d814c54c4

View File

@ -63,7 +63,7 @@ class Command(CommandArguments):
if out == "-" or out == "-.json": if out == "-" or out == "-.json":
self.stdout.write(json.dumps(schema_dict, indent=indent, sort_keys=True)) self.stdout.write(json.dumps(schema_dict, indent=indent, sort_keys=True))
elif out == "-.graphql": elif out == "-.graphql":
self.stdout.write(print_schema(schema)) self.stdout.write(print_schema(schema.graphql_schema))
else: else:
# Determine format # Determine format
_, file_extension = os.path.splitext(out) _, file_extension = os.path.splitext(out)