summaryrefslogtreecommitdiff
path: root/app/graphql/types/group_release_sort_enum.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/group_release_sort_enum.rb')
-rw-r--r--app/graphql/types/group_release_sort_enum.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/graphql/types/group_release_sort_enum.rb b/app/graphql/types/group_release_sort_enum.rb
new file mode 100644
index 00000000000..7420e7a31ad
--- /dev/null
+++ b/app/graphql/types/group_release_sort_enum.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module Types
+ # Not inheriting from Types::SortEnum since we only want
+ # to implement a subset of the sort values it defines.
+ class GroupReleaseSortEnum < BaseEnum
+ graphql_name 'GroupReleaseSort'
+ description 'Values for sorting releases belonging to a group'
+
+ # Borrowed from Types::ReleaseSortEnum and Types::SortEnum
+ # These values/descriptions should stay in-sync as much as possible.
+ value 'RELEASED_AT_DESC', 'Released at by descending order.', value: :released_at_desc
+ value 'RELEASED_AT_ASC', 'Released at by ascending order.', value: :released_at_asc
+ end
+end