Skip to content

Expose awarded emojis on notes through GraphQL

Problem to solve

To enable consumers of our GraphQL API to fully represent a conversation on an MR/Issue, we should expose award emojis for discussion notes.

One of the use cases for this feature is to support reactions when reviewing MRs in the ~"VS Code" gitlab-vscode-extension#269 (closed).

Proposal

Introduce awardEmojis field on the Note GraphQL entity. This would allow the GraphQL clients to retrieve discussion notes with emojis.

Further details

  • RESTful API allows getting a list of award emojis for a single note https://docs.gitlab.com/ee/api/award_emoji.html#award-emoji-on-comments. This approach might create tens or hundreds of requests per MR/Issue.

  • We do provide GraphQL mutation to add award emoji to a note:

    mutation{
      awardEmojiAdd(input:{awardableId: "gid://gitlab/DiffNote/447164415", name: "tada"}){
        errors
      }
    }

Links / references