Skip to content

Commit 9c3f9e6

Browse files
committed
Implement remaining Schema Printer tests & fix bugs in schema_printer.
1 parent 572fdca commit 9c3f9e6

File tree

2 files changed

+373
-4
lines changed

2 files changed

+373
-4
lines changed

graphql/core/utils/schema_printer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ def _print_type(type):
5656
return _print_union(type)
5757

5858
elif isinstance(type, GraphQLEnumType):
59-
return _print_enum(GraphQLEnumType)
59+
return _print_enum(type)
6060

6161
assert isinstance(type, GraphQLInputObjectType)
62-
return _print_input_object(GraphQLInputObjectType)
62+
return _print_input_object(type)
6363

6464

6565
def _print_scalar(type):
@@ -95,7 +95,7 @@ def _print_enum(type):
9595
'enum {} {{\n'
9696
'{}\n'
9797
'}}'
98-
).format(type.name, '\n'.join(' ' + v.name for v in type.get_values()))
98+
).format(type.name, '\n'.join(' ' + v.name for v in type.get_values().values()))
9999

100100

101101
def _print_input_object(type):

0 commit comments

Comments
 (0)