Hi,
As the title says, GraphQL APIs are not able to fetch private repositories inside organizations.
I don’t know if this is intended with new APIs, but with REST one I could.
I don’t think my query is wrong, but anyway, here it is:
'{user(login: "%s"){repositories(ownerAffiliations:%s, first:%s, orderBy: {field: NAME, direction: ASC}){ nodes { diskUsage name owner { login } description url isFork isPrivate forkCount stargazerCount isInOrganization collaborators(affiliation: DIRECT, first: 100) { nodes {login name avatarUrl} } mentionableUsers(first: 100){ nodes{ login name avatarUrl } } defaultBranchRef { name } refs(refPrefix: "refs/heads/", first: 100){ nodes{ name target { ... on Commit { oid tree { oid } zipballUrl tarballUrl } } } } } } } }'
("%s" is replaced by users’ info in code)
I am the owner of 2 organizations, and member of another 2. In one of them there is only one repository (non-empty) and it is private. I cannot see this one repository.
The token I’m using has full permissions, and the organization in question doesn’t have specific privacy settings.