Class: Types::NamespaceType

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

Direct Known Subclasses

GroupType

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

#achievements_pathObject



125
126
127
128
129
# File 'app/graphql/types/namespace_type.rb', line 125

def achievements_path
  return unless Feature.enabled?(:achievements, object)

  ::Gitlab::Routing.url_helpers.group_achievements_path(object) if object.is_a?(Group)
end

#cross_project_pipeline_available?Boolean

Returns:

  • (Boolean)


135
136
137
# File 'app/graphql/types/namespace_type.rb', line 135

def cross_project_pipeline_available?
  object.licensed_feature_available?(:cross_project_pipelines)
end

#root_storage_statisticsObject



139
140
141
# File 'app/graphql/types/namespace_type.rb', line 139

def root_storage_statistics
  Gitlab::Graphql::Loaders::BatchRootStorageStatisticsLoader.new(object.id).find
end

#timelog_categoriesObject



131
132
133
# File 'app/graphql/types/namespace_type.rb', line 131

def timelog_categories
  object.timelog_categories if Feature.enabled?(:timelog_categories)
end