Skip to content

Commit

Permalink
Default to nil to run the or conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
daemonsy committed Mar 20, 2020
1 parent baa3931 commit e00b768
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/apollo-federation/tracing/tracer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def self.execute_query_lazy(data, &block)
# because we don't have the error `location` here.
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
def self.execute_field(data, &block)
context = data.fetch(:context) || data.fetch(:query).context
context = data.fetch(:context, nil) || data.fetch(:query).context
return block.call unless context && context[:tracing_enabled]

start_time_nanos = Process.clock_gettime(Process::CLOCK_MONOTONIC, :nanosecond)
Expand Down

0 comments on commit e00b768

Please sign in to comment.