summaryrefslogtreecommitdiff
path: root/app/graphql/subscriptions/notes/created.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/subscriptions/notes/created.rb')
-rw-r--r--app/graphql/subscriptions/notes/created.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/graphql/subscriptions/notes/created.rb b/app/graphql/subscriptions/notes/created.rb
new file mode 100644
index 00000000000..07b7b308163
--- /dev/null
+++ b/app/graphql/subscriptions/notes/created.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+module Subscriptions
+ module Notes
+ class Created < Base
+ payload_type ::Types::Notes::NoteType
+
+ 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
+ end
+ end
+end