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:



13
14
15
16
# File 'lib/graphql/tracing/trace.rb', line 13

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

Instance Method Details

#analyze_multiplex(multiplex:) ⇒ Object



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

def analyze_multiplex(multiplex:)
  yield
end

#analyze_query(query:) ⇒ Object



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

def analyze_query(query:)
  yield
end

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



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

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

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



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

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

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



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

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

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



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

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

#execute_multiplex(multiplex:) ⇒ Object



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

def execute_multiplex(multiplex:)
  yield
end

#execute_query(query:) ⇒ Object



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

def execute_query(query:)
  yield
end

#execute_query_lazy(query:, multiplex:) ⇒ Object



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

def execute_query_lazy(query:, multiplex:)
  yield
end

#lex(query_string:) ⇒ Object

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



19
20
21
# File 'lib/graphql/tracing/trace.rb', line 19

def lex(query_string:)
  yield
end

#parse(query_string:) ⇒ Object



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

def parse(query_string:)
  yield
end

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



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

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

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



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

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

#validate(query:, validate:) ⇒ Object



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

def validate(query:, validate:)
  yield
end