Sha256: c350f88a991e02110b49c9b2768fd3850cc7bd9b24ac3a665d15fec903dd38e3
Contents?: true
Size: 695 Bytes
Versions: 28
Compression:
Stored size: 695 Bytes
Contents
# frozen_string_literal: true module Decidim module Core # This interface represents a commentable object. AuthorableInterface = GraphQL::InterfaceType.define do name "AuthorableInterface" description "An interface that can be used in authorable objects." field :author, Decidim::Core::AuthorInterface, "The resource author" do # can be an Authorable or a Coauthorable resolve ->(authorable, _, _) { if authorable.respond_to?(:normalized_author) authorable&.normalized_author elsif authorable.respond_to?(:creator_identity) authorable&.creator_identity end } end end end end
Version data entries
28 entries across 28 versions & 1 rubygems