Sha256: ca527969335e9a380a0d9f8fbb905d74f7bb17cc77a67060d26039f513b41752
Contents?: true
Size: 731 Bytes
Versions: 50
Compression:
Stored size: 731 Bytes
Contents
# frozen_string_literal: true module Decidim module Accountability class AccountabilityType < Decidim::Api::Types::BaseObject implements Decidim::Core::ComponentInterface graphql_name "Accountability" description "An accountability component of a participatory space." field :results, Decidim::Accountability::ResultType.connection_type, null: true, connection: true def results Result.where(component: object).includes(:component) end field :result, Decidim::Accountability::ResultType, null: true do argument :id, ID, required: true end def result(**args) Result.where(component: object).find_by(id: args[:id]) end end end end
Version data entries
50 entries across 50 versions & 1 rubygems