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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/notes')
-rw-r--r--app/graphql/types/notes/diff_image_position_input_type.rb8
-rw-r--r--app/graphql/types/notes/diff_position_base_input_type.rb4
-rw-r--r--app/graphql/types/notes/diff_position_input_type.rb6
-rw-r--r--app/graphql/types/notes/diff_position_type.rb16
-rw-r--r--app/graphql/types/notes/discussion_type.rb12
-rw-r--r--app/graphql/types/notes/note_type.rb10
6 files changed, 28 insertions, 28 deletions
diff --git a/app/graphql/types/notes/diff_image_position_input_type.rb b/app/graphql/types/notes/diff_image_position_input_type.rb
index d56c67bbec8..d535dea2e07 100644
--- a/app/graphql/types/notes/diff_image_position_input_type.rb
+++ b/app/graphql/types/notes/diff_image_position_input_type.rb
@@ -5,14 +5,14 @@ module Types
class DiffImagePositionInputType < DiffPositionBaseInputType
graphql_name 'DiffImagePositionInput'
+ argument :height, GraphQL::Types::Int, required: true,
+ description: copy_field_description(Types::Notes::DiffPositionType, :height)
+ argument :width, GraphQL::Types::Int, required: true,
+ description: copy_field_description(Types::Notes::DiffPositionType, :width)
argument :x, GraphQL::Types::Int, required: true,
description: copy_field_description(Types::Notes::DiffPositionType, :x)
argument :y, GraphQL::Types::Int, required: true,
description: copy_field_description(Types::Notes::DiffPositionType, :y)
- argument :width, GraphQL::Types::Int, required: true,
- description: copy_field_description(Types::Notes::DiffPositionType, :width)
- argument :height, GraphQL::Types::Int, required: true,
- description: copy_field_description(Types::Notes::DiffPositionType, :height)
end
end
end
diff --git a/app/graphql/types/notes/diff_position_base_input_type.rb b/app/graphql/types/notes/diff_position_base_input_type.rb
index e773fbbc8a1..2780dbab573 100644
--- a/app/graphql/types/notes/diff_position_base_input_type.rb
+++ b/app/graphql/types/notes/diff_position_base_input_type.rb
@@ -3,10 +3,10 @@
module Types
module Notes
class DiffPositionBaseInputType < BaseInputObject
+ argument :base_sha, GraphQL::Types::String, required: false,
+ description: copy_field_description(Types::DiffRefsType, :base_sha)
argument :head_sha, GraphQL::Types::String, required: true,
description: copy_field_description(Types::DiffRefsType, :head_sha)
- argument :base_sha, GraphQL::Types::String, required: false,
- description: copy_field_description(Types::DiffRefsType, :base_sha)
argument :start_sha, GraphQL::Types::String, required: true,
description: copy_field_description(Types::DiffRefsType, :start_sha)
diff --git a/app/graphql/types/notes/diff_position_input_type.rb b/app/graphql/types/notes/diff_position_input_type.rb
index 18ce6672d14..ccde4188f29 100644
--- a/app/graphql/types/notes/diff_position_input_type.rb
+++ b/app/graphql/types/notes/diff_position_input_type.rb
@@ -5,10 +5,10 @@ module Types
class DiffPositionInputType < DiffPositionBaseInputType
graphql_name 'DiffPositionInput'
- argument :old_line, GraphQL::Types::Int, required: false,
- description: copy_field_description(Types::Notes::DiffPositionType, :old_line)
argument :new_line, GraphQL::Types::Int, required: false,
- description: copy_field_description(Types::Notes::DiffPositionType, :new_line)
+ description: "#{copy_field_description(Types::Notes::DiffPositionType, :new_line)} Please see the [REST API Documentation](https://docs.gitlab.com/ee/api/discussions.html#create-a-new-thread-in-the-merge-request-diff) for more information on how to use this field."
+ argument :old_line, GraphQL::Types::Int, required: false,
+ description: "#{copy_field_description(Types::Notes::DiffPositionType, :old_line)} Please see the [REST API Documentation](https://docs.gitlab.com/ee/api/discussions.html#create-a-new-thread-in-the-merge-request-diff) for more information on how to use this field."
end
end
end
diff --git a/app/graphql/types/notes/diff_position_type.rb b/app/graphql/types/notes/diff_position_type.rb
index 9c756d56b97..531bd0edac0 100644
--- a/app/graphql/types/notes/diff_position_type.rb
+++ b/app/graphql/types/notes/diff_position_type.rb
@@ -12,28 +12,28 @@ module Types
field :file_path, GraphQL::Types::String, null: false,
description: 'Path of the file that was changed.'
- field :old_path, GraphQL::Types::String, null: true,
- description: 'Path of the file on the start SHA.'
field :new_path, GraphQL::Types::String, null: true,
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.'
field :position_type, Types::Notes::PositionTypeEnum, null: false,
description: 'Type of file the position refers to.'
# Fields for text positions
- field :old_line, GraphQL::Types::Int, null: true,
- description: 'Line on start SHA that was changed.'
field :new_line, GraphQL::Types::Int, null: true,
description: 'Line on HEAD SHA that was changed.'
+ field :old_line, GraphQL::Types::Int, null: true,
+ 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.'
+ field :width, GraphQL::Types::Int, null: true,
+ description: 'Total width of the image.'
field :x, GraphQL::Types::Int, null: true,
description: 'X position of the note.'
field :y, GraphQL::Types::Int, null: true,
description: 'Y position of the note.'
- field :width, GraphQL::Types::Int, null: true,
- description: 'Total width of the image.'
- field :height, GraphQL::Types::Int, null: true,
- description: 'Total height of the image.'
def old_line
object.old_line if object.on_text?
diff --git a/app/graphql/types/notes/discussion_type.rb b/app/graphql/types/notes/discussion_type.rb
index ffe61c9ff88..89778b2a99a 100644
--- a/app/graphql/types/notes/discussion_type.rb
+++ b/app/graphql/types/notes/discussion_type.rb
@@ -11,16 +11,16 @@ module Types
implements(Types::ResolvableInterface)
- field :id, DiscussionID, null: false,
- description: "ID of this discussion."
- field :reply_id, DiscussionID, null: false,
- description: 'ID used to reply to this discussion.'
field :created_at, Types::TimeType, null: false,
description: "Timestamp of the discussion's creation."
- field :notes, Types::Notes::NoteType.connection_type, null: false,
- description: 'All notes in the discussion.'
+ field :id, DiscussionID, null: false,
+ description: "ID of this discussion."
field :noteable, Types::NoteableType, null: true,
description: 'Object which the discussion belongs to.'
+ field :notes, Types::Notes::NoteType.connection_type, null: false,
+ description: 'All notes in the discussion.'
+ field :reply_id, DiscussionID, null: false,
+ description: 'ID used to reply to this discussion.'
# DiscussionID.coerce_result is suitable here, but will always mark this
# as being a 'Discussion'. Using `GlobalId.build` guarantees that we get
diff --git a/app/graphql/types/notes/note_type.rb b/app/graphql/types/notes/note_type.rb
index 7314c137010..32f3ff7f556 100644
--- a/app/graphql/types/notes/note_type.rb
+++ b/app/graphql/types/notes/note_type.rb
@@ -33,17 +33,17 @@ module Types
method: :note,
description: 'Content of the note.'
+ field :confidential, GraphQL::Types::Boolean, null: true,
+ description: 'Indicates if this note is confidential.',
+ method: :confidential?
field :created_at, Types::TimeType, null: false,
description: 'Timestamp of the note creation.'
- field :updated_at, Types::TimeType, null: false,
- description: "Timestamp of the note's last activity."
field :discussion, Types::Notes::DiscussionType, null: true,
description: 'Discussion this note is a part of.'
field :position, Types::Notes::DiffPositionType, null: true,
description: 'Position of this note on a diff.'
- field :confidential, GraphQL::Types::Boolean, null: true,
- description: 'Indicates if this note is confidential.',
- method: :confidential?
+ field :updated_at, Types::TimeType, null: false,
+ description: "Timestamp of the note's last activity."
field :url, GraphQL::Types::String,
null: true,
description: 'URL to view this Note in the Web UI.'