Sha256: 91cd7569944659e7b63369b5ce35a91dfa0fc4ae542c20411a7d841c3c43ebfb

Contents?: true

Size: 695 Bytes

Versions: 21

Compression:

Stored size: 695 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Core
    ComponentInterface = GraphQL::InterfaceType.define do
      name "ComponentInterface"
      description "This interface is implemented by all components that belong into a Participatory Space"

      field :id, !types.ID, "The Component's unique ID"

      field :name, !TranslatedFieldType, "The name of this component."

      field :weight, !types.Int, "The weight of the component"

      field :participatorySpace, !ParticipatorySpaceType, "The participatory space in which this component belongs to.", property: :participatory_space

      resolve_type ->(obj, _ctx) { obj.manifest.query_type.constantize }
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
decidim-core-0.23.6 lib/decidim/api/component_interface.rb
decidim-core-0.23.5 lib/decidim/api/component_interface.rb
decidim-core-0.23.4 lib/decidim/api/component_interface.rb
decidim-core-0.23.3 lib/decidim/api/component_interface.rb
decidim-core-0.23.2 lib/decidim/api/component_interface.rb
decidim-core-0.23.1 lib/decidim/api/component_interface.rb
decidim-core-0.23.1.rc1 lib/decidim/api/component_interface.rb
decidim-core-0.23.0 lib/decidim/api/component_interface.rb
decidim-core-0.22.0 lib/decidim/api/component_interface.rb
decidim-core-0.21.0 lib/decidim/api/component_interface.rb
decidim-core-0.20.1 lib/decidim/api/component_interface.rb
decidim-core-0.20.0 lib/decidim/api/component_interface.rb
decidim-core-0.19.1 lib/decidim/api/component_interface.rb
decidim-core-0.18.1 lib/decidim/api/component_interface.rb
decidim-core-0.19.0 lib/decidim/api/component_interface.rb
decidim-core-0.17.2 lib/decidim/api/component_interface.rb
decidim-core-0.18.0 lib/decidim/api/component_interface.rb
decidim-core-0.17.1 lib/decidim/api/component_interface.rb
decidim-core-0.16.1 lib/decidim/api/component_interface.rb
decidim-core-0.17.0 lib/decidim/api/component_interface.rb