contributionsCollection vs data in users object

What is the difference between these two queries?

query {
  user(login: "desai10") {
    contributionsCollection {
      totalPullRequestContributions
    }
  }
}

and

query{
  user(login: "desai10") {
    pullRequests {
      totalCount
    }
  }
}

?
the 1st query says I have raised 5 PRs while the 2nd one says I have raised 17 PRs (17 seems to be the correct number).

These two queries are supposed to give the same number right? what is the difference?

Okay, this question was answered in stackoverflow by Madhu Bhat. Link to answer

A short summary of the answer - there is a from parameter to the contributionsCollection which defaults to the current year. Whereas there is no such parameter for the 2nd query, it takes every PR ever raised.

1 Like