Module: Skylight::Probes::GraphQL::InstrumentationV2::AnalyzeQueryNotification Private

Defined in:
lib/skylight/probes/graphql.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

GraphQL versions >= 2.5 are missing this notification

Instance Method Summary collapse

Instance Method Details

#analyze_query(**metadata, &blk) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



68
69
70
71
72
73
74
75
76
77
# File 'lib/skylight/probes/graphql.rb', line 68

def analyze_query(**, &blk)
  if @notifications_engine
    @notifications_engine.instrument("analyze_query.graphql", , &blk)
  elsif @notifications
    @notifications.instrument("analyze_query.graphql", , &blk)
  else
    # safety fallback in case graphql's authors unexpectedly rename @notifications_engine or @notifications
    super
  end
end