@@ -400,6 +400,7 @@ def evaluate_selection(path, result_name, field_ast_nodes_or_ast_node, scoped_co
400
400
raise "Invariant: no field for #{ owner_type } .#{ field_name } "
401
401
end
402
402
end
403
+
403
404
return_type = field_defn . type
404
405
405
406
next_path = path . dup
@@ -425,18 +426,17 @@ def evaluate_selection(path, result_name, field_ast_nodes_or_ast_node, scoped_co
425
426
total_args_count = field_defn . arguments ( context ) . size
426
427
if total_args_count == 0
427
428
resolved_arguments = GraphQL ::Execution ::Interpreter ::Arguments ::EMPTY
428
- evaluate_selection_with_args ( resolved_arguments , field_defn , next_path , ast_node , field_ast_nodes , scoped_context , owner_type , object , is_eager_field , result_name , selections_result , parent_object )
429
+ evaluate_selection_with_args ( resolved_arguments , field_defn , next_path , ast_node , field_ast_nodes , scoped_context , owner_type , object , is_eager_field , result_name , selections_result , parent_object , return_type )
429
430
else
430
431
# TODO remove all arguments(...) usages?
431
432
@query . arguments_cache . dataload_for ( ast_node , field_defn , object ) do |resolved_arguments |
432
- evaluate_selection_with_args ( resolved_arguments , field_defn , next_path , ast_node , field_ast_nodes , scoped_context , owner_type , object , is_eager_field , result_name , selections_result , parent_object )
433
+ evaluate_selection_with_args ( resolved_arguments , field_defn , next_path , ast_node , field_ast_nodes , scoped_context , owner_type , object , is_eager_field , result_name , selections_result , parent_object , return_type )
433
434
end
434
435
end
435
436
end
436
437
437
- def evaluate_selection_with_args ( arguments , field_defn , next_path , ast_node , field_ast_nodes , scoped_context , owner_type , object , is_eager_field , result_name , selection_result , parent_object ) # rubocop:disable Metrics/ParameterLists
438
+ def evaluate_selection_with_args ( arguments , field_defn , next_path , ast_node , field_ast_nodes , scoped_context , owner_type , object , is_eager_field , result_name , selection_result , parent_object , return_type ) # rubocop:disable Metrics/ParameterLists
438
439
context . scoped_context = scoped_context
439
- return_type = field_defn . type
440
440
after_lazy ( arguments , owner : owner_type , field : field_defn , path : next_path , ast_node : ast_node , scoped_context : context . scoped_context , owner_object : object , arguments : arguments , result_name : result_name , result : selection_result ) do |resolved_arguments |
441
441
if resolved_arguments . is_a? ( GraphQL ::ExecutionError ) || resolved_arguments . is_a? ( GraphQL ::UnauthorizedError )
442
442
continue_value ( next_path , resolved_arguments , owner_type , field_defn , return_type . non_null? , ast_node , result_name , selection_result )
0 commit comments