Class: GraphQL::Tracing::Trace

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/tracing/trace.rb

Overview

This is the base class for a trace instance whose methods are called during query execution. “Trace modes” are subclasses of this with custom tracing modules mixed in.

A trace module may implement any of the methods on Trace, being sure to call super to continue any tracing hooks and call the actual runtime behavior. See Backtrace::Trace for example.

Direct Known Subclasses

LegacyTrace

Instance Method Summary collapse

Constructor Details

#initialize(multiplex: nil, query: nil, **_options) ⇒ Trace

Returns a new instance of Trace.

Parameters:



16
17
18
19
# File 'lib/graphql/tracing/trace.rb', line 16

def initialize(multiplex: nil, query: nil, **_options)
  @multiplex = multiplex
  @query = query
end

Instance Method Details

#analyze_multiplex(multiplex:) ⇒ Object



34
35
36
# File 'lib/graphql/tracing/trace.rb', line 34

def analyze_multiplex(multiplex:)
  yield
end

#analyze_query(query:) ⇒ Object



38
39
40
# File 'lib/graphql/tracing/trace.rb', line 38

def analyze_query(query:)
  yield
end

#authorized(query:, type:, object:) ⇒ Object



62
63
64
# File 'lib/graphql/tracing/trace.rb', line 62

def authorized(query:, type:, object:)
  yield
end

#authorized_lazy(query:, type:, object:) ⇒ Object



66
67
68
# File 'lib/graphql/tracing/trace.rb', line 66

def authorized_lazy(query:, type:, object:)
  yield
end

#execute_field(field:, query:, ast_node:, arguments:, object:) ⇒ Object



54
55
56
# File 'lib/graphql/tracing/trace.rb', line 54

def execute_field(field:, query:, ast_node:, arguments:, object:)
  yield
end

#execute_field_lazy(field:, query:, ast_node:, arguments:, object:) ⇒ Object



58
59
60
# File 'lib/graphql/tracing/trace.rb', line 58

def execute_field_lazy(field:, query:, ast_node:, arguments:, object:)
  yield
end

#execute_multiplex(multiplex:) ⇒ Object



42
43
44
# File 'lib/graphql/tracing/trace.rb', line 42

def execute_multiplex(multiplex:)
  yield
end

#execute_query(query:) ⇒ Object



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

def execute_query(query:)
  yield
end

#execute_query_lazy(query:, multiplex:) ⇒ Object



50
51
52
# File 'lib/graphql/tracing/trace.rb', line 50

def execute_query_lazy(query:, multiplex:)
  yield
end

#lex(query_string:) ⇒ Object

The Ruby parser doesn’t call this method (graphql/c_parser does.)



22
23
24
# File 'lib/graphql/tracing/trace.rb', line 22

def lex(query_string:)
  yield
end

#parse(query_string:) ⇒ Object



26
27
28
# File 'lib/graphql/tracing/trace.rb', line 26

def parse(query_string:)
  yield
end

#resolve_type(query:, type:, object:) ⇒ Object



70
71
72
# File 'lib/graphql/tracing/trace.rb', line 70

def resolve_type(query:, type:, object:)
  yield
end

#resolve_type_lazy(query:, type:, object:) ⇒ Object



74
75
76
# File 'lib/graphql/tracing/trace.rb', line 74

def resolve_type_lazy(query:, type:, object:)
  yield
end

#validate(query:, validate:) ⇒ Object



30
31
32
# File 'lib/graphql/tracing/trace.rb', line 30

def validate(query:, validate:)
  yield
end