Skip to content

Commit 04eb0bb

Browse files
committed
Put back dead check before running fields, try not checking parent deadness
1 parent 697f9fb commit 04eb0bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/graphql/execution/interpreter/runtime.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ def evaluate_selections(owner_object, owner_type, is_eager_selection, gathered_s
396396

397397
# @return [void]
398398
def evaluate_selection(result_name, field_ast_nodes_or_ast_node, owner_object, owner_type, is_eager_field, selections_result, parent_object) # rubocop:disable Metrics/ParameterLists
399+
return if dead_result?(selections_result)
399400
# As a performance optimization, the hash key will be a `Node` if
400401
# there's only one selection of the field. But if there are multiple
401402
# selections of the field, it will be an Array of nodes
@@ -559,7 +560,7 @@ def evaluate_selection_with_args(arguments, field_defn, ast_node, field_ast_node
559560
end
560561

561562
def dead_result?(selection_result)
562-
selection_result.graphql_dead || ((parent = selection_result.graphql_parent) && parent.graphql_dead)
563+
selection_result.graphql_dead # || ((parent = selection_result.graphql_parent) && parent.graphql_dead)
563564
end
564565

565566
def set_result(selection_result, result_name, value)

0 commit comments

Comments
 (0)