Issue list contains duplicate items if fetched and filtered by labels


#1

Some issues contains more than one label, when filter labels contain them all together, they will be fetched twice in result list.

query:

query issues(
  $name: String!
  $owner: String!
  $first: Int
  $last: Int
  $before: String
  $after: String
  $labels: [String!]
) {
  repository(name: $name, owner: $owner) {
    issues(
      first: $first
      last: $last
      before: $before
      after: $after
      orderBy: { direction: DESC, field: CREATED_AT }
      states: OPEN
      labels: $labels
    ) {
      nodes {
        createdAt
        id
        number
        title
        labels(first: 5) {
          nodes {
            color
            id
            name
          }
        }
      }
      pageInfo {
        endCursor
        hasNextPage
        hasPreviousPage
        startCursor
      }
    }
  }
}

variables:

{
  "name": "vue",
  "owner": "vuejs",
  "first": 25,
  "labels": ["bug", "intend to implement", "wontfix", "important", "need repro", "contribution welcome", "feature request", "regression", "discussion", "improvement", "pending", "in review", "backlog", "in progress", "1.x", "2.x", "weex", "good first issue", "typescript", "browser quirks", "semver:minor", "semver:major"]
}

#2

Hi @JounQin!

Indeed! I’ve created an internal issue, and I’ll update this when the bug has been fixed. Thanks for reporting it!


#3

Hi @JounQin!

This issue should be fixed! Let me know if you run into anything else, and thanks again for bringing it to our attention!


#4

Thx it works now, and I have an another question: It seems there is no way to filter issue list with specific labels + no label, it would be great to support labels: ['foo', 'bar', null]. Or support exclude specific labels?


#5

Hey @JounQin,

Interesting! I had not thought about something like this, I’m not sure how this would fit into the current query mechanisms, but I can definitely see that being able to filter by unlabeled issues would be a good idea. Let me take this back to the team and think about what makes sense!