diff options
Diffstat (limited to 'app/graphql/types/ci/group_variables_sort_enum.rb')
-rw-r--r-- | app/graphql/types/ci/group_variables_sort_enum.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/graphql/types/ci/group_variables_sort_enum.rb b/app/graphql/types/ci/group_variables_sort_enum.rb new file mode 100644 index 00000000000..5cf9fd4039b --- /dev/null +++ b/app/graphql/types/ci/group_variables_sort_enum.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module Types + module Ci + # Not inheriting from Types::SortEnum since we only want + # to implement a subset of the sort values it defines. + class GroupVariablesSortEnum < BaseEnum + graphql_name 'CiGroupVariablesSort' + description 'Values for sorting inherited variables' + + # Borrowed from Types::SortEnum + # These values/descriptions should stay in-sync as much as possible. + value 'CREATED_DESC', 'Created at descending order.', value: :created_desc + value 'CREATED_ASC', 'Created at ascending order.', value: :created_asc + + value 'KEY_DESC', 'Key by descending order.', value: :key_desc + value 'KEY_ASC', 'Key by ascending order.', value: :key_asc + end + end +end |