RedHatInsights/insights-api-common-rails

View on GitHub
lib/insights/api/common/graphql/templates/aggregate_model_type.erb

Summary

Maintainability
Test Coverage
<%= klass_name %>AggregateType = ::GraphQL::ObjectType.define do
  name "<%= klass_name %>AggregateType"
  description "A <%= klass_name %>AggregateType to wrap metrics aggregation"

  field :aggregate, AggregateType do
    resolve ->(object, _args, _ctx) { object }
  end
end