Class: GraphQL::Client::LogSubscriber

Inherits:
ActiveSupport::LogSubscriber
  • Object
show all
Defined in:
lib/graphql/client/log_subscriber.rb

Instance Method Summary collapse

Instance Method Details

#query(event) ⇒ Object



6
7
8
9
# File 'lib/graphql/client/log_subscriber.rb', line 6

def query(event)
  info { "#{event.payload[:name]} (#{event.duration.round(1)}ms) #{event.payload[:operation_name].gsub("__", "::")}" }
  debug { event.payload[:document].to_query_string }
end