Complex query: all issues with reactions from specific people

schema-request

#1

We have a list of critical customers – and their GitHub accounts.

I’d love to be able to query across our org for issues where these accounts have done a thumbs up/down.

If it’s possible now, I’d love to know how.

If it’s not, consider it a feature request!

Thanks…


#2

:wave: @kevmoo,

Off the top of my head, I don’t think this is possible right now. I’m not sure of the best way to design this schema, either. Perhaps something like this:

query($criticalUserIDs:[ID!]!) {
  nodes(ids:$criticalUserIDs) {
    ... on User {
      reactions(last:100,content:[THUMBS_UP,THUMBS_DOWN]) {
        edges {
          node {
            reactable {
              ... on Issue {
                owner {
                  ... on Organization {
                    login
                  }
                }
              }

              ... on PullRequest {
                owner {
                  ... on Organization {
                    login
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

But even still, you’d end up with a lot of null results where the owner is a User and not an Organization, and you’d have to filter out all of the owners on the client side that aren’t the organization you’re looking for :thinking:.

I’ve added this as a schema request. We’ll update you here when we have this functionality.


#3

Any updates here?