summaryrefslogtreecommitdiff
path: root/app/graphql/types/notes/noteable_interface.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/notes/noteable_interface.rb')
-rw-r--r--app/graphql/types/notes/noteable_interface.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/graphql/types/notes/noteable_interface.rb b/app/graphql/types/notes/noteable_interface.rb
index bd22f12d6f0..537084dff62 100644
--- a/app/graphql/types/notes/noteable_interface.rb
+++ b/app/graphql/types/notes/noteable_interface.rb
@@ -7,6 +7,7 @@ module Types
field :notes, Types::Notes::NoteType.connection_type, null: false, description: "All notes on this noteable."
field :discussions, Types::Notes::DiscussionType.connection_type, null: false, description: "All discussions on this noteable."
+ field :commenters, Types::UserType.connection_type, null: false, description: "All commenters on this noteable."
def self.resolve_type(object, context)
case object
@@ -24,6 +25,10 @@ module Types
raise "Unknown GraphQL type for #{object}"
end
end
+
+ def commenters
+ object.commenters(user: current_user)
+ end
end
end
end