totalCount ignoring filters in CommitHistoryConnection

community-help

#1
{
  user(login: "samkit-jain") {
    r1: repositories(isFork: true) {
      totalCount
    }
    r2: repositories {
      totalCount
    }
  }
}

gives correct totalCount values in r1 (count of forked repos) and r2 (total count of repos). But, if you do the same with CommitHistoryConnection, it doesn’t work. Example snippet,

  ref(qualifiedName: "master") {
    target {
      ... on Commit {
        c1: history {
          totalCount
        }
        c2: history(author: {id: "MDQ6VXNlcjE1MTI3MTE1"}, first: 50) {
          totalCount
          nodes {
            commitUrl
            author {
              name
            }
          }
        }
      }
    }
  }

totalCount in c1 correctly shows the total count of commits but in c2, totalCount again displays the same value. It is not considering the filter CommitAuthor. nodes considers the filter though and only lists commits made by the author specified.


#2

Hi @samkit-jain!

Thanks for this bug report! I am very able to reproduce it myself. I’ve entered a bug report, and we’ll update this issue when it’s fixed!

Thanks, and let me know if there’s anything else we can do!


#3

Thank you @nickvanw. Hoping for a quick fix :slight_smile:


#4

Hi @nickvanw! Any updates? When can we expect this to be fixed?


#5

@nickvanw I am facing the same issue in my app. I see this is a very old issue, by when can it be resolved?


#6

Hey @hereisnaman and @samkit-jain!

I have a fix for this issue up in a Pull Request internally! It probably won’t get deployed until the weekend is over, but I think we should be able to get it out early next week!

Thanks so much for your patience!


#7

It would be really helpful @nickvanw. Thanks a lot.


#8

Hey @hereisnaman and @samkit-jain!

This should be fixed! Let me know if anything else in that connection looks incorrect, or if we can do anything else! Sorry for the delays, and thanks again for reporting this!