Module: GraphQL::Tracing::LegacyHooksTrace

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

Defined Under Namespace

Modules: RunHooks

Instance Method Summary collapse

Instance Method Details

#execute_multiplex(multiplex:) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/graphql/tracing/legacy_hooks_trace.rb', line 5

def execute_multiplex(multiplex:)
  multiplex_instrumenters = multiplex.schema.instrumenters[:multiplex]
  query_instrumenters = multiplex.schema.instrumenters[:query]
  # First, run multiplex instrumentation, then query instrumentation for each query
  RunHooks.call_hooks(multiplex_instrumenters, multiplex, :before_multiplex, :after_multiplex) do
    RunHooks.each_query_call_hooks(query_instrumenters, multiplex.queries) do
      super
    end
  end
end