Skip to content

Commit 9570236

Browse files
committed
Add deprecation warning to Schema.tracer
1 parent 4315fb1 commit 9570236

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/graphql/schema.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,6 +1130,8 @@ def default_directives
11301130
end
11311131

11321132
def tracer(new_tracer)
1133+
warn("`Schema.tracer(#{new_tracer.inspect})` is deprecated; use module-based `trace_with` instead. See: https://graphql-ruby.org/queries/tracing.html")
1134+
warn " #{caller(1, 1).first}"
11331135
default_trace = trace_class_for(:default, build: true)
11341136
if default_trace.nil? || !(default_trace < GraphQL::Tracing::CallLegacyTracers)
11351137
trace_with(GraphQL::Tracing::CallLegacyTracers)

0 commit comments

Comments
 (0)