Skip to content

Commit

Permalink
Fix input object printing
Browse files Browse the repository at this point in the history
  • Loading branch information
rmosolgo committed Jan 29, 2018
1 parent 176832e commit f437dd9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions lib/graphql/language/nodes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,6 @@ def serialize_value_for_hash(value)
serialize_value_for_hash v
end
when Enum
# TODO: this is required for _loading_ default values for input objects,
# but it breaks printing those values!
value.name
when NullValue
nil
Expand Down
2 changes: 1 addition & 1 deletion lib/graphql/language/printer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def print_inline_fragment(inline_fragment, indent: "")
end

def print_input_object(input_object)
print_node(input_object.to_h)
"{#{input_object.arguments.map { |a| "#{a.name}: #{print(a.value)}" }.join(", ")}}"
end

def print_list_type(list_type)
Expand Down

0 comments on commit f437dd9

Please sign in to comment.