blob: c8f47b16f759bb08ddd572e05d8df881a8f4d8b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# frozen_string_literal: true
module Resolvers
module Ci
# NOTE: This class was introduced to allow modifying the meaning of certain values in RunnerStatusEnum
# while preserving backward compatibility. It can be removed in 17.0 after being deprecated
# and made a no-op in %16.0 (legacy_mode will be hard-coded to nil).
class RunnerStatusResolver < BaseResolver
type Types::Ci::RunnerStatusEnum, null: false
alias_method :runner, :object
argument :legacy_mode,
type: GraphQL::Types::String,
default_value: nil,
required: false,
description: 'No-op, left for compatibility.',
deprecated: {
reason: 'Will be removed in 17.0',
milestone: '15.0'
}
def resolve(**args)
runner.status
end
end
end
end
|