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, authorize, authorized?, #current_user, #id

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Instance Method Details

#projectObject



64
65
66
# File 'app/graphql/types/clusters/agent_type.rb', line 64

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

#web_pathObject



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

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