Sha256: db19ab3acef3cbe811fb8c2340d4ec2d50e879c7a7c0f00215fba71e1688d6e7
Contents?: true
Size: 704 Bytes
Versions: 9
Compression:
Stored size: 704 Bytes
Contents
# frozen_string_literal: true module Decidim module Core # This interface represents an object capable of endorsements. EndorsableInterface = GraphQL::InterfaceType.define do name "EndorsableInterface" description "An interface that can be used in objects with endorsements" field :endorsements, !types[Decidim::Core::AuthorInterface], "The endorsements of this object." do resolve ->(object, _, _) { object.endorsements.map(&:normalized_author) } end field :endorsementsCount, types.Int do description "The total amount of endorsements the object has received" property :endorsements_count end end end end
Version data entries
9 entries across 9 versions & 1 rubygems