Sha256: 20df720599f58ae0a9f313a58c0673c5769c40f269afea1efaaa2dca0450dae2
Contents?: true
Size: 566 Bytes
Versions: 10
Compression:
Stored size: 566 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 AmendableEntityInterface = GraphQL::InterfaceType.define do name "AmendableEntityInterface" description "An interface that can be used in objects with amendments" field :id, !types.ID, "ID of this entity" resolve_type ->(obj, _ctx) { "#{obj.class.name}Type".constantize } end end end
Version data entries
10 entries across 10 versions & 1 rubygems