module GraphQL::Tracing::ActiveSupportNotificationsTrace

This implementation forwards events to ActiveSupport::Notifications with a graphql suffix.

Examples

Example: Sending execution events to ActiveSupport::Notifications

class MySchema < GraphQL::Schema
  trace_with(GraphQL::Tracing::ActiveSupportNotificationsTrace)
end

Example: Subscribing to GraphQL events with ActiveSupport::Notifications

ActiveSupport::Notifications.subscribe(/graphql/) do |event|
  pp event.name
  pp event.payload
end