diff options
Diffstat (limited to 'app/graphql/types/event_action_enum.rb')
-rw-r--r-- | app/graphql/types/event_action_enum.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/graphql/types/event_action_enum.rb b/app/graphql/types/event_action_enum.rb new file mode 100644 index 00000000000..79931fa48cb --- /dev/null +++ b/app/graphql/types/event_action_enum.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Types + class EventActionEnum < BaseEnum + graphql_name 'EventAction' + description 'Event action' + + ::Event.actions.keys.each do |target_type| + value target_type.upcase, value: target_type, description: "#{target_type.titleize} action" + end + end +end |