Sha256: 931bff5c88527384262014d1afb4dbed85273a1281b9b986aa05e893d8fe7393

Contents?: true

Size: 1.16 KB

Versions: 43

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true

module Platform
  module Objects
    BlameRange = GraphQL::ObjectType.define do
      name "BlameRange"
      description "Represents a range of information from a Git blame."

      scopeless_tokens_as_minimum


      interfaces [
        Interfaces::A,
        Interfaces::B,
      ]

      field :startingLine, !types.Int do
        description "The starting line for the range"

        resolve ->(range, args, context) {
          range.lines.first[:lineno]
        }
      end

      field :endingLine, !types.Int do
        description "The ending line for the range"

        resolve ->(range, args, context) {
          range.lines.first[:lineno] + (range.lines.length - 1)
        }
      end

      field :commit, -> { !Objects::Commit } do
        description "Identifies the line author"
      end

      field :age, !types.Int do
        description "Identifies the recency of the change, from 1 (new) to 10 (old). This is calculated as a 2-quantile and determines the length of distance between the median age of all the changes in the file and the recency of the current range's change."
        property :scale
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
graphql-1.8.18 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.9.11 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.9.10 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.9.9 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.9.8 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.9.7 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.9.6 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.9.5 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.9.4 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.9.3 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.9.2 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.8.17 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.8.16 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.9.1 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.9.0 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.8.15 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.9.0.pre4 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.8.14 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.9.0.pre3 spec/fixtures/upgrader/blame_range.original.rb
graphql-1.9.0.pre2 spec/fixtures/upgrader/blame_range.original.rb