@@ -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
@@ -378,7 +378,7 @@ def continue_field(path, value, owner_type, field, current_type, ast_node, next_
378378 end
379379 when "OBJECT"
380380 object_proxy = begin
381- authorized_new ( current_type , value , context , path )
381+ authorized_new ( current_type , value , context )
382382 rescue GraphQL ::ExecutionError => err
383383 err
384384 end
@@ -641,22 +641,8 @@ def resolve_type(type, value, path)
641641 end
642642 end
643643
644- def authorized_new ( type , value , context , path )
645- trace_payload = { context : context , type : type , object : value , path : path }
646-
647- auth_val = context . query . trace ( "authorized" , trace_payload ) do
648- type . authorized_new ( value , context )
649- end
650-
651- if context . schema . lazy? ( auth_val )
652- GraphQL ::Execution ::Lazy . new do
653- context . query . trace ( "authorized_lazy" , trace_payload ) do
654- context . schema . sync_lazy ( auth_val )
655- end
656- end
657- else
658- auth_val
659- end
644+ def authorized_new ( type , value , context )
645+ type . authorized_new ( value , context )
660646 end
661647 end
662648 end
0 commit comments