lib/graphql/execution/lookahead.rb in graphql-1.12.24 vs lib/graphql/execution/lookahead.rb in graphql-1.13.0
- old
+ new
@@ -252,17 +252,17 @@
when GraphQL::Language::Nodes::InlineFragment
on_type = selected_type
subselections_on_type = selections_on_type
if (t = ast_selection.type)
# Assuming this is valid, that `t` will be found.
- on_type = @query.schema.get_type(t.name).type_class
+ on_type = @query.get_type(t.name).type_class
subselections_on_type = subselections_by_type[on_type] ||= {}
end
find_selections(subselections_by_type, subselections_on_type, on_type, ast_selection.selections, arguments)
when GraphQL::Language::Nodes::FragmentSpread
frag_defn = @query.fragments[ast_selection.name] || raise("Invariant: Can't look ahead to nonexistent fragment #{ast_selection.name} (found: #{@query.fragments.keys})")
# Again, assuming a valid AST
- on_type = @query.schema.get_type(frag_defn.type.name).type_class
+ on_type = @query.get_type(frag_defn.type.name).type_class
subselections_on_type = subselections_by_type[on_type] ||= {}
find_selections(subselections_by_type, subselections_on_type, on_type, frag_defn.selections, arguments)
else
raise "Invariant: Unexpected selection type: #{ast_selection.class}"
end