summaryrefslogtreecommitdiff
path: root/app/graphql/types/project_statistics_type.rb
blob: 5ab3cc33e85902680c2e32459778cd310c179553 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# frozen_string_literal: true

module Types
  class ProjectStatisticsType < BaseObject
    graphql_name 'ProjectStatistics'

    authorize :read_statistics

    field :commit_count, GraphQL::Types::Float, null: false,
          description: 'Commit count of the project.'

    field :build_artifacts_size, GraphQL::Types::Float, null: false,
          description: 'Build artifacts size of the project in bytes.'
    field :lfs_objects_size, GraphQL::Types::Float, null: false,
          description: 'Large File Storage (LFS) object size of the project in bytes.'
    field :packages_size, GraphQL::Types::Float, null: false,
          description: 'Packages size of the project in bytes.'
    field :pipeline_artifacts_size, GraphQL::Types::Float, null: true,
          description: 'CI Pipeline artifacts size in bytes.'
    field :repository_size, GraphQL::Types::Float, null: false,
          description: 'Repository size of the project in bytes.'
    field :snippets_size, GraphQL::Types::Float, null: true,
          description: 'Snippets size of the project in bytes.'
    field :storage_size, GraphQL::Types::Float, null: false,
          description: 'Storage size of the project in bytes.'
    field :uploads_size, GraphQL::Types::Float, null: true,
          description: 'Uploads size of the project in bytes.'
    field :wiki_size, GraphQL::Types::Float, null: true,
          description: 'Wiki size of the project in bytes.'
    field :container_registry_size, GraphQL::Types::Float, null: true,
          description: 'Container Registry size of the project in bytes.'
  end
end