2019-05-12 21:10:46 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Types
|
|
|
|
class ProjectStatisticsType < BaseObject
|
|
|
|
graphql_name 'ProjectStatistics'
|
|
|
|
|
2019-06-14 20:40:21 +00:00
|
|
|
authorize :read_statistics
|
|
|
|
|
2020-03-30 09:07:58 +00:00
|
|
|
field :commit_count, GraphQL::FLOAT_TYPE, null: false,
|
2019-10-31 12:06:26 +00:00
|
|
|
description: 'Commit count of the project'
|
2019-05-12 21:10:46 +00:00
|
|
|
|
2020-03-30 09:07:58 +00:00
|
|
|
field :storage_size, GraphQL::FLOAT_TYPE, null: false,
|
2019-10-31 12:06:26 +00:00
|
|
|
description: 'Storage size of the project'
|
2020-03-30 09:07:58 +00:00
|
|
|
field :repository_size, GraphQL::FLOAT_TYPE, null: false,
|
2019-10-31 12:06:26 +00:00
|
|
|
description: 'Repository size of the project'
|
2020-03-30 09:07:58 +00:00
|
|
|
field :lfs_objects_size, GraphQL::FLOAT_TYPE, null: false,
|
2019-10-31 12:06:26 +00:00
|
|
|
description: 'Large File Storage (LFS) object size of the project'
|
2020-03-30 09:07:58 +00:00
|
|
|
field :build_artifacts_size, GraphQL::FLOAT_TYPE, null: false,
|
2019-10-31 12:06:26 +00:00
|
|
|
description: 'Build artifacts size of the project'
|
2020-03-30 09:07:58 +00:00
|
|
|
field :packages_size, GraphQL::FLOAT_TYPE, null: false,
|
2019-10-31 12:06:26 +00:00
|
|
|
description: 'Packages size of the project'
|
2020-03-30 09:07:58 +00:00
|
|
|
field :wiki_size, GraphQL::FLOAT_TYPE, null: true,
|
2019-10-31 12:06:26 +00:00
|
|
|
description: 'Wiki size of the project'
|
2020-06-29 09:09:01 +00:00
|
|
|
field :snippets_size, GraphQL::FLOAT_TYPE, null: true,
|
|
|
|
description: 'Snippets size of the project'
|
2019-05-12 21:10:46 +00:00
|
|
|
end
|
|
|
|
end
|