Skip to content

Commit 90bbb3b

Browse files
committed
Push a little fix to .print
1 parent 7f69d87 commit 90bbb3b

File tree

1 file changed

+3
-1
lines changed
  • lib/graphql/internal_representation

1 file changed

+3
-1
lines changed

lib/graphql/internal_representation/print.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ def print_node(node, indent: 0)
2626
query_str << "#{padding}#{node.name}: #{node.definition_name}"
2727
end
2828

29-
args = node.ast_nodes.map { |n| n.arguments.map(&:to_query_string).join(",") }.uniq
29+
args = node.ast_nodes.map { |n| n.arguments.map(&:to_query_string).join(",") }
30+
.reject { |a| a == "" }
31+
.uniq
3032
query_str << args.map { |a| "(#{a})"}.join("|")
3133
end
3234

0 commit comments

Comments
 (0)