Sha256: 1c61ccd7f8de96297709c8d4589b81cb8d9cb3a50bf6d3fcf204e777acbdac3b

Contents?: true

Size: 561 Bytes

Versions: 50

Compression:

Stored size: 561 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Core
    # This interface should be implemented by any Type that can be used as amendment
    # The only requirement is to have an ID and the Type name be the class.name + Type
    module AmendableEntityInterface
      include Decidim::Api::Types::BaseInterface
      description "An interface that can be used in objects with amendments"

      field :id, ID, "ID of this entity", null: false

      def self.resolve_type(obj, _ctx)
        "#{obj.class.name}Type".constantize
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
decidim-core-0.29.1 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.28.4 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.27.9 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.29.0 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.28.3 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.27.8 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.29.0.rc4 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.29.0.rc3 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.29.0.rc2 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.29.0.rc1 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.28.2 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.27.7 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.28.1 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.27.6 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.26.10 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.26.9 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.28.0 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.27.5 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.28.0.rc5 lib/decidim/api/interfaces/amendable_entity_interface.rb
decidim-core-0.28.0.rc4 lib/decidim/api/interfaces/amendable_entity_interface.rb