debian-mirror-gitlab/app/graphql/resolvers/clusters/agent_tokens_resolver.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
518 B
Ruby
Raw Normal View History

2021-11-18 22:05:49 +05:30
# frozen_string_literal: true
module Resolvers
module Clusters
class AgentTokensResolver < BaseResolver
type Types::Clusters::AgentTokenType, null: true
alias_method :agent, :object
delegate :project, to: :agent
2022-03-02 08:16:31 +05:30
argument :status, Types::Clusters::AgentTokenStatusEnum,
required: false,
description: 'Status of the token.'
2021-11-18 22:05:49 +05:30
def resolve(**args)
2023-03-04 22:38:38 +05:30
::Clusters::AgentTokensFinder.new(agent, current_user, args).execute
2021-11-18 22:05:49 +05:30
end
end
end
end