diff options
Diffstat (limited to 'app/graphql/types/blame/blame_type.rb')
-rw-r--r-- | app/graphql/types/blame/blame_type.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/graphql/types/blame/blame_type.rb b/app/graphql/types/blame/blame_type.rb new file mode 100644 index 00000000000..7e7ba14988d --- /dev/null +++ b/app/graphql/types/blame/blame_type.rb @@ -0,0 +1,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 |