Sha256: 9989e51583e8a0b990f1f52a682ec2ef57eba52bd4c7b67c3273d8574c8645d8

Contents?: true

Size: 688 Bytes

Versions: 31

Compression:

Stored size: 688 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Core
    # This interface represents a resource that contains categories.
    module CategoriesContainerInterface
      include Decidim::Api::Types::BaseInterface
      description "An interface that can be used in objects that contain categories."

      field :categories, [Decidim::Core::CategoryType, { null: true }], "Categories for this space", null: false do
        argument :filter, Decidim::Core::CategoryInputFilter, "Provides several methods to filter the results", required: false
      end

      def categories(filter: {})
        CategoryList.new.call(object, { filter: filter }, context)
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
decidim-core-0.27.9 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.27.8 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.27.7 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.27.6 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.26.10 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.26.9 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.27.5 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.26.8 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.27.4 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.27.3 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.26.7 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.26.5 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.27.2 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.27.1 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.26.4 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.27.0 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.26.3 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.27.0.rc2 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.27.0.rc1 lib/decidim/api/interfaces/categories_container_interface.rb
decidim-core-0.26.2 lib/decidim/api/interfaces/categories_container_interface.rb