Class: GraphQL::Tracing::Trace
- Inherits:
-
Object
- Object
- GraphQL::Tracing::Trace
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.
Instance Method Summary
collapse
-
#analyze_multiplex(multiplex:) ⇒ Object
-
#analyze_query(query:) ⇒ Object
-
#authorized(query:, type:, object:) ⇒ Object
-
#authorized_lazy(query:, type:, object:) ⇒ Object
-
#execute_field(field:, query:, ast_node:, arguments:, object:) ⇒ Object
-
#execute_field_lazy(field:, query:, ast_node:, arguments:, object:) ⇒ Object
-
#execute_multiplex(multiplex:) ⇒ Object
-
#execute_query(query:) ⇒ Object
-
#execute_query_lazy(query:, multiplex:) ⇒ Object
-
#initialize(multiplex: nil, query: nil, **_options) ⇒ Trace
constructor
-
#lex(query_string:) ⇒ Object
-
#parse(query_string:) ⇒ Object
-
#resolve_type(query:, type:, object:) ⇒ Object
-
#resolve_type_lazy(query:, type:, object:) ⇒ Object
-
#validate(query:, validate:) ⇒ Object
Constructor Details
#initialize(multiplex: nil, query: nil, **_options) ⇒ Trace
Returns a new instance of Trace.
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
30
31
32
|
# File 'lib/graphql/tracing/trace.rb', line 30
def analyze_multiplex(multiplex:)
yield
end
|
#analyze_query(query:) ⇒ Object
34
35
36
|
# File 'lib/graphql/tracing/trace.rb', line 34
def analyze_query(query:)
yield
end
|
#authorized(query:, type:, object:) ⇒ Object
58
59
60
|
# File 'lib/graphql/tracing/trace.rb', line 58
def authorized(query:, type:, object:)
yield
end
|
#authorized_lazy(query:, type:, object:) ⇒ Object
62
63
64
|
# File 'lib/graphql/tracing/trace.rb', line 62
def authorized_lazy(query:, type:, object:)
yield
end
|
#execute_field(field:, query:, ast_node:, arguments:, object:) ⇒ Object
50
51
52
|
# File 'lib/graphql/tracing/trace.rb', line 50
def execute_field(field:, query:, ast_node:, arguments:, object:)
yield
end
|
#execute_field_lazy(field:, query:, ast_node:, arguments:, object:) ⇒ Object
54
55
56
|
# File 'lib/graphql/tracing/trace.rb', line 54
def execute_field_lazy(field:, query:, ast_node:, arguments:, object:)
yield
end
|
#execute_multiplex(multiplex:) ⇒ Object
38
39
40
|
# File 'lib/graphql/tracing/trace.rb', line 38
def execute_multiplex(multiplex:)
yield
end
|
#execute_query(query:) ⇒ Object
42
43
44
|
# File 'lib/graphql/tracing/trace.rb', line 42
def execute_query(query:)
yield
end
|
#execute_query_lazy(query:, multiplex:) ⇒ Object
46
47
48
|
# File 'lib/graphql/tracing/trace.rb', line 46
def execute_query_lazy(query:, multiplex:)
yield
end
|
#lex(query_string:) ⇒ Object
18
19
20
|
# File 'lib/graphql/tracing/trace.rb', line 18
def lex(query_string:)
yield
end
|
#parse(query_string:) ⇒ Object
22
23
24
|
# File 'lib/graphql/tracing/trace.rb', line 22
def parse(query_string:)
yield
end
|
#resolve_type(query:, type:, object:) ⇒ Object
66
67
68
|
# File 'lib/graphql/tracing/trace.rb', line 66
def resolve_type(query:, type:, object:)
yield
end
|
#resolve_type_lazy(query:, type:, object:) ⇒ Object
70
71
72
|
# File 'lib/graphql/tracing/trace.rb', line 70
def resolve_type_lazy(query:, type:, object:)
yield
end
|
#validate(query:, validate:) ⇒ Object
26
27
28
|
# File 'lib/graphql/tracing/trace.rb', line 26
def validate(query:, validate:)
yield
end
|