Welcome to mirror list, hosted at ThFree Co, Russian Federation.

blame_type.rb « blame « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7e7ba14988d56ac63165a911de3beb9591977814 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

module Types
  module Blame
    # rubocop: disable Graphql/AuthorizeTypes
    class BlameType < BaseObject
      # This is presented through `Repository` that has its own authorization
      graphql_name 'Blame'

      present_using Gitlab::BlamePresenter

      field :first_line, GraphQL::Types::String, null: true,
        description: 'First line of Git Blame for given range.', calls_gitaly: true
      field :groups, [Types::Blame::GroupsType], null: true,
        description: 'Git Blame grouped by contiguous lines for commit.', calls_gitaly: true,
        method: :groups_commit_data
    end
    # rubocop: enable Graphql/AuthorizeTypes
  end
end