Skip to content

Expose DesignType#notes_count in GraphQL

Luke Duncalfe requested to merge 13353-DesignType-notes_count into master

What does this MR do?

  • This MR exposes a new #user_notes_count method on Design as DesignType#notes_count in GraphQL. The method uses a new DesignUserNotesCountService which inherits from BaseCountService and caches the count.
  • New after_commit callbacks have been added to Note to call #after_note_created and #after_note_destroyed on their noteable, so the noteable can perform tasks particular to them, like cache expiry.
  • Refactors into a shared example some spec behaviour tests of a counter caching service

CE backport https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/32037.

Issue #13353 (closed).

Does this MR meet the acceptance criteria?

Conformity

Performance and Testing

Edited by 🤖 GitLab Bot 🤖

Merge request reports