I'm new to Github API v3 (rest) & v4 (graphql).
I have created a PAT (personal access token) and using it to fetch data from github - organization private repositories.
While able to get other users data (event, commits, issues etc.) in my organization with V3 api (REST),
I can't get information when using V4 api (Graphql) - I get info only when querying my own user, for other users I get zeros.
The graphql query I use (token is set in the header and some user in my org):
query {
user (login: "<user>") {
contributionsCollection(from: "2020-01-01T00:00:00.000Z", to: "2020-06-25T23:59:59.999Z", organizationID: "<my_org_id>") {
totalCommitContributions
totalIssueContributions
totalPullRequestContributions
totalPullRequestReviewContributions
totalRepositoriesWithContributedCommits
totalRepositoriesWithContributedIssues
totalRepositoriesWithContributedPullRequestReviews
totalRepositoriesWithContributedPullRequests
}
}
}
and the zeroed response (when querying myself I get non-zero values):
{
"data": {
"user": {
"contributionsCollection": {
"totalCommitContributions": 0,
"totalIssueContributions": 0,
"totalPullRequestContributions": 0,
"totalPullRequestReviewContributions": 0,
"totalRepositoriesWithContributedCommits": 0,
"totalRepositoriesWithContributedIssues": 0,
"totalRepositoriesWithContributedPullRequestReviews": 0,
"totalRepositoriesWithContributedPullRequests": 0
}
}
}
}
While in REST api:
curl -H "Authorization: token <TOKEN>" -X GET 'https://api.github.com/users/<user>/events?page=1&per_page=10'
I get information (on the specified dates above)
What am I missing?