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.16.0 lib/decidim/api/component_interface.rb