Sha256: d11bb329cbea54d537e31f47cfb2ae3c87e6ce479971d89d18c0bea111b1b876

Contents?: true

Size: 917 Bytes

Versions: 10

Compression:

Stored size: 917 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Core
    TraceVersionType = GraphQL::ObjectType.define do
      name "TraceVersion"
      description "A trace version type"

      field :id, !types.ID, "The ID of the version"
      field :createdAt, Decidim::Core::DateTimeType do
        description "The date and time this version was created"
        property :created_at
      end
      field :editor, Decidim::Core::AuthorInterface do
        description "The editor/author of this version"
        resolve ->(obj, _args, _ctx) {
          author = Decidim.traceability.version_editor(obj)
          author if author.is_a?(Decidim::User) || author.is_a?(Decidim::UserGroup)
        }
      end
      field :changeset, GraphQL::Types::JSON do
        description "Object with the changes in this version"
        resolve ->(obj, _args, _ctx) {
          obj.changeset
        }
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
decidim-core-0.23.6 app/types/decidim/core/trace_version_type.rb
decidim-core-0.23.5 app/types/decidim/core/trace_version_type.rb
decidim-core-0.23.4 app/types/decidim/core/trace_version_type.rb
decidim-core-0.23.3 app/types/decidim/core/trace_version_type.rb
decidim-core-0.23.2 app/types/decidim/core/trace_version_type.rb
decidim-core-0.23.1 app/types/decidim/core/trace_version_type.rb
decidim-core-0.23.1.rc1 app/types/decidim/core/trace_version_type.rb
decidim-core-0.23.0 app/types/decidim/core/trace_version_type.rb
decidim-core-0.22.0 app/types/decidim/core/trace_version_type.rb
decidim-core-0.21.0 app/types/decidim/core/trace_version_type.rb