lib/graphiti_graphql/runner.rb in graphiti_graphql-0.1.16 vs lib/graphiti_graphql/runner.rb in graphiti_graphql-0.1.17
- old
+ new
@@ -324,11 +324,11 @@
end
end
end
def gather_stats(params, selection, variable_hash, chained_name = nil)
- stats = selection.children.find { |c| c.name == "stats" }
- nodes = selection.children.find { |c| c.name == "nodes" }
+ stats = selection.children.find { |c| c.respond_to?(:name) && c.name == "stats" }
+ nodes = selection.children.find { |c| c.respond_to?(:name) && c.name == "nodes" }
if stats
stat_param = {}
stats.children.each do |stat_node|
stat_name = stat_node.name.underscore