query UserStats(
$login: String!
$from: DateTime!
$to: DateTime!
$repoAfter: String
$repoFirst: Int!
) {
user(login: $login) {
id
name
login
bio
company
location
websiteUrl
twitterUsername
avatarUrl
createdAt
followers {
totalCount
}
organizations {
totalCount
}
repositories(
ownerAffiliations: OWNER
first: $repoFirst
after: $repoAfter
orderBy: { field: STARGAZERS, direction: DESC }
) {
totalCount
pageInfo {
hasNextPage
endCursor
}
nodes {
stargazerCount
forkCount
}
}
contributionsCollection(from: $from, to: $to) {
totalCommitContributions
totalPullRequestContributions
totalIssueContributions
totalRepositoryContributions
restrictedContributionsCount
contributionYears
firstIssueContribution {
... on CreatedIssueContribution {
occurredAt
}
}
firstPullRequestContribution {
... on CreatedPullRequestContribution {
occurredAt
}
}
firstRepositoryContribution {
... on CreatedRepositoryContribution {
occurredAt
}
}
contributionCalendar {
totalContributions
weeks {
contributionDays {
date
contributionCount
contributionLevel
}
}
}
}
}
}