Class: Subscriptions::Notes::Created

Inherits:
Base show all
Defined in:
app/graphql/subscriptions/notes/created.rb

Instance Method Summary collapse

Methods inherited from Base

#authorized?

Methods included from Gitlab::Graphql::Laziness

#defer, #force

Methods inherited from BaseSubscription

#authorized?, #initialize, #subscribe

Constructor Details

This class inherits a constructor from Subscriptions::BaseSubscription

Instance Method Details

#update(*args) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'app/graphql/subscriptions/notes/created.rb', line 8

def update(*args)
  case object
  when ResourceEvent
    object.work_item_synthetic_system_note
  when Array
    object.first.work_item_synthetic_system_note(events: object)
  else
    object
  end
end