lib/rails/graphql/directive.rb
def all_events
        @all_events ||= self.class.all_events.transform_values do |events|
          events.map { |item| Callback.set_context(item, self) }
        end
      end
# When fetching all the events, embed the actual instance as the context
# of the callback
When fetching all the events, embed the actual instance as the context
of the callback
When fetching all the events embed the actual instance as the context of the callback
def all_events
        @all_events ||= self.class.all_events.transform_values do |events|
          events.map { |item| Callback.set_context(item, self) }
        end
      end
def all_events @all_events ||= self . class . all_events . transform_values do | events | events . map { | item | Callback . set_context ( item , self ) } end end
When fetching all the events, embed the actual instance as the context
of the callback
When fetching all the events embed the actual instance as the context of the callback