summaryrefslogtreecommitdiff
path: root/app/graphql/types/notes/diff_position_type.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/notes/diff_position_type.rb')
-rw-r--r--app/graphql/types/notes/diff_position_type.rb24
1 files changed, 13 insertions, 11 deletions
diff --git a/app/graphql/types/notes/diff_position_type.rb b/app/graphql/types/notes/diff_position_type.rb
index 531bd0edac0..dd343cf45e4 100644
--- a/app/graphql/types/notes/diff_position_type.rb
+++ b/app/graphql/types/notes/diff_position_type.rb
@@ -7,33 +7,35 @@ module Types
class DiffPositionType < BaseObject
graphql_name 'DiffPosition'
- field :diff_refs, Types::DiffRefsType, null: false,
+ field :diff_refs,
+ Types::DiffRefsType,
+ null: false,
description: 'Information about the branch, HEAD, and base at the time of commenting.'
field :file_path, GraphQL::Types::String, null: false,
- description: 'Path of the file that was changed.'
+ description: 'Path of the file that was changed.'
field :new_path, GraphQL::Types::String, null: true,
- description: 'Path of the file on the HEAD SHA.'
+ description: 'Path of the file on the HEAD SHA.'
field :old_path, GraphQL::Types::String, null: true,
- description: 'Path of the file on the start SHA.'
+ description: 'Path of the file on the start SHA.'
field :position_type, Types::Notes::PositionTypeEnum, null: false,
- description: 'Type of file the position refers to.'
+ description: 'Type of file the position refers to.'
# Fields for text positions
field :new_line, GraphQL::Types::Int, null: true,
- description: 'Line on HEAD SHA that was changed.'
+ description: 'Line on HEAD SHA that was changed.'
field :old_line, GraphQL::Types::Int, null: true,
- description: 'Line on start SHA that was changed.'
+ description: 'Line on start SHA that was changed.'
# Fields for image positions
field :height, GraphQL::Types::Int, null: true,
- description: 'Total height of the image.'
+ description: 'Total height of the image.'
field :width, GraphQL::Types::Int, null: true,
- description: 'Total width of the image.'
+ description: 'Total width of the image.'
field :x, GraphQL::Types::Int, null: true,
- description: 'X position of the note.'
+ description: 'X position of the note.'
field :y, GraphQL::Types::Int, null: true,
- description: 'Y position of the note.'
+ description: 'Y position of the note.'
def old_line
object.old_line if object.on_text?