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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/user_preferences_type.rb')
-rw-r--r--app/graphql/types/user_preferences_type.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/graphql/types/user_preferences_type.rb b/app/graphql/types/user_preferences_type.rb
new file mode 100644
index 00000000000..9a1ea4a2e4f
--- /dev/null
+++ b/app/graphql/types/user_preferences_type.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+module Types
+ # rubocop: disable Graphql/AuthorizeTypes
+ # Only used to render the current user's own preferences
+ class UserPreferencesType < BaseObject
+ graphql_name 'UserPreferences'
+
+ field :issues_sort, Types::IssueSortEnum,
+ description: 'Sort order for issue lists.',
+ null: true
+
+ def issues_sort
+ object.issues_sort.to_sym
+ end
+ end
+end