Method: GraphQL::Tracing::Traceable#trace

Defined in:
lib/graphql/tracing.rb

#trace(key, metadata, &block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Must return the value of the block.

Parameters:

  • key (String)

    The name of the event in GraphQL internals

  • metadata (Hash)

    Event-related metadata (can be anything)

Returns:

  • (Object)

    Must return the value of the block



45
46
47
48
# File 'lib/graphql/tracing.rb', line 45

def trace(key, , &block)
  return yield if @tracers.empty?
  call_tracers(0, key, , &block)
end