@@ -50,7 +50,7 @@ def run_eager
5050 root_type = schema . root_type_for_operation ( root_op_type )
5151 path = [ ]
5252 set_all_interpreter_context ( query . root_value , nil , nil , path )
53- object_proxy = authorized_new ( root_type , query . root_value , context , path )
53+ object_proxy = authorized_new ( root_type , query . root_value , context )
5454 object_proxy = schema . sync_lazy ( object_proxy )
5555 if object_proxy . nil?
5656 # Root .authorized? returned false.
@@ -193,7 +193,7 @@ def evaluate_selection(path, result_name, field_ast_nodes_or_ast_node, scoped_co
193193 object = owner_object
194194
195195 if is_introspection
196- object = authorized_new ( field_defn . owner , object , context , next_path )
196+ object = authorized_new ( field_defn . owner , object , context )
197197 end
198198
199199 total_args_count = field_defn . arguments . size
@@ -372,7 +372,7 @@ def continue_field(path, value, owner_type, field, current_type, ast_node, next_
372372 end
373373 when "OBJECT"
374374 object_proxy = begin
375- authorized_new ( current_type , value , context , path )
375+ authorized_new ( current_type , value , context )
376376 rescue GraphQL ::ExecutionError => err
377377 err
378378 end
@@ -635,22 +635,8 @@ def resolve_type(type, value, path)
635635 end
636636 end
637637
638- def authorized_new ( type , value , context , path )
639- trace_payload = { context : context , type : type , object : value , path : path }
640-
641- auth_val = context . query . trace ( "authorized" , trace_payload ) do
642- type . authorized_new ( value , context )
643- end
644-
645- if context . schema . lazy? ( auth_val )
646- GraphQL ::Execution ::Lazy . new do
647- context . query . trace ( "authorized_lazy" , trace_payload ) do
648- context . schema . sync_lazy ( auth_val )
649- end
650- end
651- else
652- auth_val
653- end
638+ def authorized_new ( type , value , context )
639+ type . authorized_new ( value , context )
654640 end
655641 end
656642 end
0 commit comments