summaryrefslogtreecommitdiff
path: root/app/graphql/types/admin/analytics/instance_statistics/measurement_type.rb
blob: eab42c2b78d1e7d9b4c1694fbef40db954185626 (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
# frozen_string_literal: true

module Types
  module Admin
    module Analytics
      module InstanceStatistics
        class MeasurementType < BaseObject
          include Gitlab::Graphql::Authorize::AuthorizeResource
          graphql_name 'InstanceStatisticsMeasurement'
          description 'Represents a recorded measurement (object count) for the Admins'

          authorize :read_instance_statistics_measurements

          field :recorded_at, Types::TimeType, null: true,
                description: 'The time the measurement was recorded'

          field :count, GraphQL::INT_TYPE, null: false,
                description: 'Object count'

          field :identifier, Types::Admin::Analytics::InstanceStatistics::MeasurementIdentifierEnum, null: false,
                description: 'The type of objects being measured'
        end
      end
    end
  end
end