2020-06-25 06:08:50 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Types
|
|
|
|
# rubocop: disable Graphql/AuthorizeTypes
|
|
|
|
# Types that use DiffStatsType should have their own authorization
|
|
|
|
class DiffStatsType < BaseObject
|
|
|
|
graphql_name 'DiffStats'
|
|
|
|
|
|
|
|
description 'Changes to a single file'
|
|
|
|
|
2021-07-22 09:08:22 +00:00
|
|
|
field :additions, GraphQL::Types::Int, null: false,
|
2022-08-03 06:10:47 +00:00
|
|
|
description: 'Number of lines added to this file.'
|
2021-07-22 09:08:22 +00:00
|
|
|
field :deletions, GraphQL::Types::Int, null: false,
|
2022-08-03 06:10:47 +00:00
|
|
|
description: 'Number of lines deleted from this file.'
|
2022-02-28 21:14:01 +00:00
|
|
|
field :path, GraphQL::Types::String, null: false,
|
2022-08-03 06:10:47 +00:00
|
|
|
description: 'File path, relative to repository root.'
|
2020-06-25 06:08:50 +00:00
|
|
|
end
|
|
|
|
# rubocop: enable Graphql/AuthorizeTypes
|
|
|
|
end
|