Class: Types::Clusters::AgentType

Inherits:
BaseObject
  • Object
show all
Defined in:
app/graphql/types/clusters/agent_type.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

accepts, assignable?, authorization, authorize, authorized?, #current_user, #id

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Class Method Details

.authorization_scopesObject



10
11
12
# File 'app/graphql/types/clusters/agent_type.rb', line 10

def self.authorization_scopes
  super + [:ai_workflows]
end

Instance Method Details

#projectObject



76
77
78
# File 'app/graphql/types/clusters/agent_type.rb', line 76

def project
  Gitlab::Graphql::Loaders::BatchModelLoader.new(Project, object.project_id).find
end

#web_pathObject



80
81
82
# File 'app/graphql/types/clusters/agent_type.rb', line 80

def web_path
  ::Gitlab::Routing.url_helpers.project_cluster_agent_path(object.project, object.name)
end