Sha256: 9598942fec1618862399a2145eb91834cfbdb28250314291718f7c8dd65c35ea
Contents?: true
Size: 703 Bytes
Versions: 50
Compression:
Stored size: 703 Bytes
Contents
# frozen_string_literal: true module Decidim module Budgets class BudgetsType < Decidim::Api::Types::BaseObject implements Decidim::Core::ComponentInterface graphql_name "Budgets" description "A budget component of a participatory space." field :budgets, Decidim::Budgets::BudgetType.connection_type, null: true, connection: true def budgets Budget.where(component: object).includes(:component) end field :budget, Decidim::Budgets::BudgetType, null: true do argument :id, GraphQL::Types::ID, required: true end def budget(**args) Budget.where(component: object).find_by(id: args[:id]) end end end end
Version data entries
50 entries across 50 versions & 1 rubygems