Sha256: b3536f6c26ec925f25b1d6ffb7f4f1bb092ae34044e9a6c0bd31bc18a7064ff8
Contents?: true
Size: 787 Bytes
Versions: 48
Compression:
Stored size: 787 Bytes
Contents
# frozen_string_literal: true module Decidim module Core # An abstract resolver for the GraphQL category endpoints inside a # participatory_space. Used in the keyword "categories", ie: # # participatoryProcesses { # categories(filter: { parentId: "1" }) {...} # } # # Needs to be extended and add arguments. # # This is used by ParticipatorySpaceInterface to apply filter categories # searches. class CategoryList include NeedsApiFilterAndOrder attr_reader :model_class def initialize @model_class = Decidim::Category end def call(participatory_space, args, _ctx) @query = participatory_space.categories add_filter_keys(args[:filter]) @query end end end end
Version data entries
48 entries across 48 versions & 1 rubygems