project_statistics_type.rb 845 字节
Newer Older
1 2 3 4 5 6
# frozen_string_literal: true

module Types
  class ProjectStatisticsType < BaseObject
    graphql_name 'ProjectStatistics'

7 8
    authorize :read_statistics

9
    field :commit_count, GraphQL::INT_TYPE, null: false # rubocop:disable Graphql/Descriptions
10

11 12 13 14 15 16
    field :storage_size, GraphQL::INT_TYPE, null: false # rubocop:disable Graphql/Descriptions
    field :repository_size, GraphQL::INT_TYPE, null: false # rubocop:disable Graphql/Descriptions
    field :lfs_objects_size, GraphQL::INT_TYPE, null: false # rubocop:disable Graphql/Descriptions
    field :build_artifacts_size, GraphQL::INT_TYPE, null: false # rubocop:disable Graphql/Descriptions
    field :packages_size, GraphQL::INT_TYPE, null: false # rubocop:disable Graphql/Descriptions
    field :wiki_size, GraphQL::INT_TYPE, null: true # rubocop:disable Graphql/Descriptions
17 18
  end
end