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
|
|
|
|
|
2023-07-09 08:55:56 +05:30
|
|
|
def resolve(**_args)
|
|
|
|
::Clusters::AgentTokensFinder.new(agent, current_user, status: :active).execute
|
2021-11-18 22:05:49 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|