Fail to retrieve reactions of a user for a given repository


#1

I want to get a list of reactions a user did on a specific repository, along with the issue/pull request they were made on.

The following query fails with the error "Something went wrong while executing your query. This is most likely a GitHub bug. Please include \"9341:65D9:11312CC:15E13EC:58F94B8D\" when reporting this issue.":

query { 
  viewer { 
    id
    login
    name
  }
  repository(owner: "elastic", name: "kibana") {
    pullRequests(first:10) {
      nodes {
        reactions(first:10) {
          viewerHasReacted
          totalCount
          nodes {
            content
            user {
              isViewer
            }
          }
        }
      }
    }
  }
}

#2

Thanks for reporting that bug, @scampi. It looks like viewerHasReacted is what’s causing problems. I’ve opened up an issue to investigate.

In the mean time, I think this query will get you the information that you’re looking for:

{
  repository(owner: "elastic", name: "kibana") {
    pullRequests(first: 10) {
      edges {
        node {
          reactionGroups {
            content
            users {
              totalCount
            }
            viewerHasReacted
          }
        }
      }
    }
  }
}

#3

Hi @scampi,

We believe this is now resolved. Could you let us know if this is still a problem?


#4

Hello @bswinnerton it works now, thanks