Method: GraphQL::Tracing::LegacyHooksTrace::RunHooks.each_query_call_hooks

Defined in:
lib/graphql/tracing/legacy_hooks_trace.rb

.each_query_call_hooks(instrumenters, queries, i = 0) ⇒ Object

Call the before_ hooks of each query, Then yield if no errors. call_hooks takes care of appropriate cleanup.


22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/graphql/tracing/legacy_hooks_trace.rb', line 22

def each_query_call_hooks(instrumenters, queries, i = 0)
  if i >= queries.length
    yield
  else
    query = queries[i]
    call_hooks(instrumenters, query, :before_query, :after_query) {
      each_query_call_hooks(instrumenters, queries, i + 1) {
        yield
      }
    }
  end
end