diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /app/graphql/types/notes | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'app/graphql/types/notes')
-rw-r--r-- | app/graphql/types/notes/discussion_type.rb | 2 | ||||
-rw-r--r-- | app/graphql/types/notes/note_type.rb | 12 | ||||
-rw-r--r-- | app/graphql/types/notes/noteable_type.rb | 2 |
3 files changed, 6 insertions, 10 deletions
diff --git a/app/graphql/types/notes/discussion_type.rb b/app/graphql/types/notes/discussion_type.rb index 74a233e9d26..a51d253097d 100644 --- a/app/graphql/types/notes/discussion_type.rb +++ b/app/graphql/types/notes/discussion_type.rb @@ -7,6 +7,8 @@ module Types authorize :read_note + implements(Types::ResolvableInterface) + field :id, GraphQL::ID_TYPE, null: false, description: "ID of this discussion" field :reply_id, GraphQL::ID_TYPE, null: false, diff --git a/app/graphql/types/notes/note_type.rb b/app/graphql/types/notes/note_type.rb index d48cc868434..8755b4ccad5 100644 --- a/app/graphql/types/notes/note_type.rb +++ b/app/graphql/types/notes/note_type.rb @@ -9,6 +9,8 @@ module Types expose_permissions Types::PermissionTypes::Note + implements(Types::ResolvableInterface) + field :id, GraphQL::ID_TYPE, null: false, description: 'ID of the note' @@ -22,11 +24,6 @@ module Types description: 'User who wrote this note', resolve: -> (note, args, context) { Gitlab::Graphql::Loaders::BatchModelLoader.new(User, note.author_id).find } - field :resolved_by, Types::UserType, - null: true, - description: 'User that resolved the discussion', - resolve: -> (note, _args, _context) { Gitlab::Graphql::Loaders::BatchModelLoader.new(User, note.resolved_by_id).find } - field :system, GraphQL::BOOLEAN_TYPE, null: false, description: 'Indicates whether this note was created by the system or by a user' @@ -44,11 +41,6 @@ module Types description: "Timestamp of the note's last activity" field :discussion, Types::Notes::DiscussionType, null: true, description: 'The discussion this note is a part of' - field :resolvable, GraphQL::BOOLEAN_TYPE, null: false, - description: 'Indicates if this note can be resolved. That is, if it is a resolvable discussion or simply a standalone note', - method: :resolvable? - field :resolved_at, Types::TimeType, null: true, - description: "Timestamp of the note's resolution" field :position, Types::Notes::DiffPositionType, null: true, description: 'The position of this note on a diff' field :confidential, GraphQL::BOOLEAN_TYPE, null: true, diff --git a/app/graphql/types/notes/noteable_type.rb b/app/graphql/types/notes/noteable_type.rb index 187c9109f8c..3a16d54f9cd 100644 --- a/app/graphql/types/notes/noteable_type.rb +++ b/app/graphql/types/notes/noteable_type.rb @@ -19,6 +19,8 @@ module Types Types::SnippetType when ::DesignManagement::Design Types::DesignManagement::DesignType + when ::AlertManagement::Alert + Types::AlertManagement::AlertType else raise "Unknown GraphQL type for #{object}" end |