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/board_list_type.rb')
-rw-r--r--app/graphql/types/board_list_type.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/app/graphql/types/board_list_type.rb b/app/graphql/types/board_list_type.rb
new file mode 100644
index 00000000000..e94ff898807
--- /dev/null
+++ b/app/graphql/types/board_list_type.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+module Types
+ # rubocop: disable Graphql/AuthorizeTypes
+ class BoardListType < BaseObject
+ graphql_name 'BoardList'
+ description 'Represents a list for an issue board'
+
+ field :id, GraphQL::ID_TYPE, null: false,
+ description: 'ID (global ID) of the list'
+ field :title, GraphQL::STRING_TYPE, null: false,
+ description: 'Title of the list'
+ field :list_type, GraphQL::STRING_TYPE, null: false,
+ description: 'Type of the list'
+ field :position, GraphQL::INT_TYPE, null: true,
+ description: 'Position of list within the board'
+ field :label, Types::LabelType, null: true,
+ description: 'Label of the list'
+ field :collapsed, GraphQL::BOOLEAN_TYPE, null: true,
+ description: 'Indicates if list is collapsed for this user',
+ resolve: -> (list, _args, ctx) { list.collapsed?(ctx[:current_user]) }
+ end
+ # rubocop: enable Graphql/AuthorizeTypes
+end
+
+Types::BoardListType.prepend_if_ee('::EE::Types::BoardListType')