lib/rails/graphql/request/component/field.rb
# This override allows reasigned fields to perform events. This
# happens when fields are originally organized from interfaces. If
# the event is stopped for the object, then it doesn't proceed to the
# strategy implementation, ensuring compatibility
This override allows reasigned fields to perform events. This
happens when fields are originally organized from interfaces. If
the event is stopped for the object, then it doesn't proceed to the
strategy implementation, ensuring compatibility
This override allows reasigned fields to perform events . This happens when fields are originally organized from interfaces . If the event is stopped for the object then it doesn ' t proceed to the strategy implementation ensuring compatibility
def trigger_event(event_name, **xargs)
            return super if !defined?(@current_object) || @current_object.nil?
            listeners = request.cache(:listeners)[field] ||= field.all_listeners
            return super unless listeners.include?(event_name)
            callbacks = request.cache(:events)[field] ||= field.all_events
            old_events, @all_events = @all_events, callbacks
            super
          ensure
            @all_events = old_events
          end
def trigger_event ( event_name , ** xargs ) return super if ! defined? ( @current_object ) || @current_object . nil? listeners = request . cache ( :listeners ) [ field ] ||= field . all_listeners return super unless listeners . include? ( event_name ) callbacks = request . cache ( :events ) [ field ] ||= field . all_events old_events , @all_events = @all_events , callbacks super ensure @all_events = old_events end
This override allows reasigned fields to perform events.
This override allows reasigned fields to perform events .
event_name
xargs