Sha256: 85cec3df19f166d0cb43624db82093e5e273c8230e0a2094d38c3016ca07e776

Contents?: true

Size: 462 Bytes

Versions: 24

Compression:

Stored size: 462 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Core
    MetricHistoryType = GraphQL::ObjectType.define do
      name "MetricHistory"

      field :key, !types.String, "The key value" do
        resolve ->(obj, _args, _ctx) { MetricObjectPresenter.new(obj).attr_date(0) }
      end

      field :value, !types.Int, "The value for each key" do
        resolve ->(obj, _args, _ctx) { MetricObjectPresenter.new(obj).attr_int(1) }
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
decidim-core-0.23.6 app/types/decidim/core/metric_history_type.rb
decidim-core-0.23.5 app/types/decidim/core/metric_history_type.rb
decidim-core-0.23.4 app/types/decidim/core/metric_history_type.rb
decidim-core-0.23.3 app/types/decidim/core/metric_history_type.rb
decidim-core-0.23.2 app/types/decidim/core/metric_history_type.rb
decidim-core-0.23.1 app/types/decidim/core/metric_history_type.rb
decidim-core-0.23.1.rc1 app/types/decidim/core/metric_history_type.rb
decidim-core-0.23.0 app/types/decidim/core/metric_history_type.rb
decidim-core-0.22.0 app/types/decidim/core/metric_history_type.rb
decidim-core-0.21.0 app/types/decidim/core/metric_history_type.rb
decidim-core-0.20.1 app/types/decidim/core/metric_history_type.rb
decidim-core-0.20.0 app/types/decidim/core/metric_history_type.rb
decidim-core-0.19.1 app/types/decidim/core/metric_history_type.rb
decidim-core-0.18.1 app/types/decidim/core/metric_history_type.rb
decidim-core-0.19.0 app/types/decidim/core/metric_history_type.rb
decidim-core-0.17.2 app/types/decidim/core/metric_history_type.rb
decidim-core-0.18.0 app/types/decidim/core/metric_history_type.rb
decidim-core-0.17.1 app/types/decidim/core/metric_history_type.rb
decidim-core-0.16.1 app/types/decidim/core/metric_history_type.rb
decidim-core-0.17.0 app/types/decidim/core/metric_history_type.rb