Querying total number of repositories excluding forks


Is there a way to query the total number of repositories of the user by excluding the forked one.

  user(login: "akshaybabloo"){
    repositories(isFork: true){

Gives only the forked one and if I remove isFork: true then the total number includes the forked repositories.


Hey @akshaybabloo,

You can use isFork: false to filter out the forks. Is that what you’re looking for?


Hi @d12,

That doesn’t seem to work. I get the same number with or without isFlag. And as far as I understand isn’t isFlag set to false by default?


It looks like I have to use affiliations: [OWNER] isFork: false then I get the correct answer.


Glad you got it sorted! Give us a shout if you come across any other problems :smile: