Sha256: 9d2babfe8d4c627e735a48bce1b69ad519cb68df39334bd5aafd747e59205030

Contents?: true

Size: 450 Bytes

Versions: 50

Compression:

Stored size: 450 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Core
    class StatisticType < Decidim::Api::Types::BaseObject
      description "Represents a single statistic"

      field :name, GraphQL::Types::String, "The name of the statistic", null: false
      field :value, GraphQL::Types::Int, "The actual value of the statistic", null: false

      def name
        object[0]
      end

      def value
        object[1]
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
decidim-core-0.25.0.rc4 lib/decidim/api/types/statistic_type.rb
decidim-core-0.25.0.rc3 lib/decidim/api/types/statistic_type.rb
decidim-core-0.25.0.rc2 lib/decidim/api/types/statistic_type.rb
decidim-core-0.25.0.rc1 lib/decidim/api/types/statistic_type.rb
decidim-core-0.24.3 lib/decidim/api/types/statistic_type.rb
decidim-core-0.24.2 lib/decidim/api/types/statistic_type.rb
decidim-core-0.24.1 lib/decidim/api/types/statistic_type.rb
decidim-core-0.24.0 lib/decidim/api/types/statistic_type.rb
decidim-core-0.24.0.rc2 lib/decidim/api/types/statistic_type.rb
decidim-core-0.24.0.rc1 lib/decidim/api/types/statistic_type.rb