Class: Resolvers::Admin::Analytics::InstanceStatistics::MeasurementsResolver

Inherits:
BaseResolver
  • Object
show all
Includes:
Gitlab::Graphql::Authorize::AuthorizeResource
Defined in:
app/graphql/resolvers/admin/analytics/instance_statistics/measurements_resolver.rb

Constant Summary

Constants included from Gitlab::Graphql::Authorize::AuthorizeResource

Gitlab::Graphql::Authorize::AuthorizeResource::RESOURCE_ACCESS_ERROR

Instance Method Summary collapse

Methods included from Gitlab::Graphql::Authorize::AuthorizeResource

#authorized_find!, #authorized_resource?, #find_object, #raise_resource_not_available_error!

Methods inherited from BaseResolver

as_single, complexity, complexity_multiplier, #current_user, field_options, last, #object, #offset_pagination, requires_argument!, resolver_complexity, #select_result, single, #single?, single_definition_blocks, singular_type, #synchronized_object, when_single

Methods included from Gitlab::Utils::Override

#extended, extensions, #included, #method_added, #override, #prepended, #queue_verification, verify!

Methods included from Gitlab::Graphql::GlobalIDCompatibility

#coerce_global_id_arguments!

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Instance Method Details

#resolve(identifier:, recorded_before: nil, recorded_after: nil) ⇒ Object


24
25
26
27
28
29
30
31
32
# File 'app/graphql/resolvers/admin/analytics/instance_statistics/measurements_resolver.rb', line 24

def resolve(identifier:, recorded_before: nil, recorded_after: nil)
  authorize!

  ::Analytics::InstanceStatistics::Measurement
    .recorded_after(recorded_after)
    .recorded_before(recorded_before)
    .with_identifier(identifier)
    .order_by_latest
end