Sha256: 135ea304027dce8ae067e18b9dc64a586b4a83c3e1ea1ae5430760cbe53c3c12
Contents?: true
Size: 515 Bytes
Versions: 40
Compression:
Stored size: 515 Bytes
Contents
# frozen_string_literal: true module Decidim module Core StatisticType = GraphQL::ObjectType.define do name "Statistic" description "Represents a single statistic" field :name, !types.String, "The name of the statistic" do resolve ->(statistic, _args, _ctx) { statistic[0] } end field :value, !types.Int, "The actual value of the statistic" do resolve ->(statistic, _args, _ctx) { statistic[1] } end end end end
Version data entries
40 entries across 40 versions & 1 rubygems