Class: Types::Clusters::AgentType

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

Instance Method Summary collapse

Methods inherited from BaseObject

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

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Instance Method Details

#projectObject



69
70
71
# File 'app/graphql/types/clusters/agent_type.rb', line 69

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

#web_pathObject



73
74
75
# File 'app/graphql/types/clusters/agent_type.rb', line 73

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