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/projects/service_type.rb')
-rw-r--r--app/graphql/types/projects/service_type.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/graphql/types/projects/service_type.rb b/app/graphql/types/projects/service_type.rb
index 4a9e5dcbfe9..88b7b95aa57 100644
--- a/app/graphql/types/projects/service_type.rb
+++ b/app/graphql/types/projects/service_type.rb
@@ -10,9 +10,20 @@ module Types
# https://gitlab.com/gitlab-org/gitlab/-/issues/213088
field :type, GraphQL::Types::String, null: true,
description: 'Class name of the service.'
+ field :service_type, ::Types::Projects::ServiceTypeEnum, null: true,
+ description: 'Type of the service.'
field :active, GraphQL::Types::Boolean, null: true,
description: 'Indicates if the service is active.'
+ def type
+ enum = ::Types::Projects::ServiceTypeEnum.coerce_result(service_type, context)
+ enum.downcase.camelize
+ end
+
+ def service_type
+ object.type
+ end
+
definition_methods do
def resolve_type(object, context)
if object.is_a?(::Integrations::Jira)