Skip to content

Add award emoji to GraphQL note type

Heinrich Lee Yu requested to merge 389967-add-emojis-to-note-type into master

What does this MR do and why?

Allows querying of award emoji for notes in GraphQL

How to set up and validate locally

Sample query
query workItemNotesByIid($fullPath: ID!, $iid: String, $after: String, $pageSize: Int) {
  workspace: project(fullPath: $fullPath) {
    id
    workItems(iid: $iid) {
      nodes {
        id
        iid
        widgets {
          ... on WorkItemWidgetNotes {
            type
            discussions(first: $pageSize, after: $after, filter: ALL_NOTES) {
              pageInfo {
                ...PageInfo
                __typename
              }
              nodes {
                id
                notes {
                  nodes {
                    ...WorkItemNote
                    __typename
                  }
                  __typename
                }
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      __typename
    }
    __typename
  }
}

fragment PageInfo on PageInfo {
  hasNextPage
  hasPreviousPage
  startCursor
  endCursor
  __typename
}

fragment WorkItemNote on Note {
  id
  body
  bodyHtml
  system
  internal
  systemNoteIconName
  createdAt
  lastEditedAt
  url
  lastEditedBy {
    ...User
    webPath
    __typename
  }
  discussion {
    id
    __typename
  }
  author {
    ...User
    __typename
  }
  userPermissions {
    adminNote
    awardEmoji
    readNote
    createNote
    resolveNote
    repositionNote
    __typename
  }
  awardEmoji {
    nodes {
      name
      emoji
      user {
        name
      }
    }
  }
  __typename
}

fragment User on User {
  id
  avatarUrl
  name
  username
  webUrl
  __typename
}
Sample variables
{"fullPath":"flightjs/Flight","iid":"43","pageSize":30}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #389967 (closed)

Edited by Heinrich Lee Yu

Merge request reports

Loading