IssueConnections within Labels

schema-request
community-help

#1

Hi there,

When I use the following query on a private repo belonging to an Organisation I belong to, no issue nodes are returned.

query{
  repository(owner: "<MY_ORGANISATION>", name: "<MY_REPOSITORY>"){
    labels(first: 100){
      edges{
        node{
          name
          issues(first:20){
            edges{
              node{
                title
              }
            }
          }
        }
      }
    }
  }
}

It functions as expected on public repositories, and the opposite direction (issues -> labels) functions normally in all repositories.
Have I missed a limitation of the API? Is my query malformed?

Thanks


#2

Hi @campbellfleury,

I don’t think your query is malformed. This is a surprising behavior that I wouldn’t have expected, especially because this query works:

query{
  repository(owner: $owner, name: $name){
    labels(first: 10){
      edges{
        node{
          name
          pullRequests(first:20){
            edges{
              node{
                title
              }
            }
          }
        }
      }
    }
  }
}

I’ve added this issue to our internal issue tracker to debug. Thank you for reporting this.


#3

Just to be certain: does your token have the repo scope?


#4

Yeah, same behaviour is observed both in the Explorer (i.e. logged in) and with a full-scope token.


#5

Sorry about the trouble here. I’ve just pushed up a fix for this.


#6

@gjtorikian @bswinnerton thanks team. Just tested it, looks great. Thanks again.