Sha256: 045fc870f00e119b76185c6f8f080f5bdf4f3ca418c6eeddea662ef276a6ed77

Contents?: true

Size: 717 Bytes

Versions: 15

Compression:

Stored size: 717 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Core
    class AttachmentType < Decidim::Api::Types::BaseObject
      description "A file attachment"

      field :title, Decidim::Core::TranslatedFieldType, "The title of this attachment.", null: false
      field :description, Decidim::Core::TranslatedFieldType, "The description of this attachment.", null: false
      field :url, GraphQL::Types::String, "The url of this attachment", null: false
      field :type, GraphQL::Types::String, "The type of this attachment", method: :file_type, null: false
      field :thumbnail, GraphQL::Types::String, "A thumbnail of this attachment, if it is an image.", method: :thumbnail_url, null: true
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
decidim-core-0.29.2 lib/decidim/api/types/attachment_type.rb
decidim-core-0.28.5 lib/decidim/api/types/attachment_type.rb
decidim-core-0.29.1 lib/decidim/api/types/attachment_type.rb
decidim-core-0.28.4 lib/decidim/api/types/attachment_type.rb
decidim-core-0.29.0 lib/decidim/api/types/attachment_type.rb
decidim-core-0.28.3 lib/decidim/api/types/attachment_type.rb
decidim-core-0.29.0.rc4 lib/decidim/api/types/attachment_type.rb
decidim-core-0.29.0.rc3 lib/decidim/api/types/attachment_type.rb
decidim-core-0.29.0.rc2 lib/decidim/api/types/attachment_type.rb
decidim-core-0.29.0.rc1 lib/decidim/api/types/attachment_type.rb
decidim-core-0.28.2 lib/decidim/api/types/attachment_type.rb
decidim-core-0.28.1 lib/decidim/api/types/attachment_type.rb
decidim-core-0.28.0 lib/decidim/api/types/attachment_type.rb
decidim-core-0.28.0.rc5 lib/decidim/api/types/attachment_type.rb
decidim-core-0.28.0.rc4 lib/decidim/api/types/attachment_type.rb