Welcome to mirror list, hosted at ThFree Co, Russian Federation.

notes_filter_type_enum.rb « work_items « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 93fb4689f0b20fdf577cec8da769bc84e5ca45a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

module Types
  module WorkItems
    class NotesFilterTypeEnum < BaseEnum
      graphql_name 'NotesFilterType'
      description 'Work item notes collection type.'

      ::UserPreference::NOTES_FILTERS.each_pair do |key, value|
        value key.upcase,
          value: value,
          description: UserPreference.notes_filters.invert[::UserPreference::NOTES_FILTERS[key]]
      end

      def self.default_value
        ::UserPreference::NOTES_FILTERS[:all_notes]
      end
    end
  end
end