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/query_type.rb')
-rw-r--r--app/graphql/types/query_type.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/graphql/types/query_type.rb b/app/graphql/types/query_type.rb
index 46d121f6552..9207a867639 100644
--- a/app/graphql/types/query_type.rb
+++ b/app/graphql/types/query_type.rb
@@ -123,6 +123,11 @@ module Types
resolver: Resolvers::Ci::RunnersResolver,
description: "Find runners visible to the current user."
+ field :ci_variables,
+ Types::Ci::VariableType.connection_type,
+ null: true,
+ description: "List of the instance's CI/CD variables."
+
field :ci_config, resolver: Resolvers::Ci::ConfigResolver, complexity: 126 # AUTHENTICATED_MAX_COMPLEXITY / 2 + 1
field :timelogs, Types::TimelogType.connection_type,
@@ -136,6 +141,10 @@ module Types
null: true,
resolver: Resolvers::BoardListResolver
+ field :todo,
+ null: true,
+ resolver: Resolvers::TodoResolver
+
field :topics, Types::Projects::TopicType.connection_type,
null: true,
resolver: Resolvers::TopicsResolver,
@@ -174,6 +183,12 @@ module Types
application_settings
end
+ def ci_variables
+ return unless current_user.can_admin_all_resources?
+
+ ::Ci::InstanceVariable.all
+ end
+
def application_settings
Gitlab::CurrentSettings.current_application_settings
end