Repository forks discrepancy


I’m using the v4 GraphQL endpoint to gather data about public repositories. I had set up a query that included forks totalCount, but now realize that there is a forkCount parameter that’s a little easier.

However, I was confused to find out that these two values are different.

For example

query {
  repository(owner: "ripple", name: "rippled") {
    forks {


  "data": {
    "repository": {
      "forkCount": 698,
      "forks": {
        "totalCount": 663

Seems that forkCount matches what the repo page shows. What does forks totalCount then refer to?


Hi @sterlingrobot,

Thanks for the question. The values are different which we’ve attempted to clarify in the fork connection and forkCount field comments.

The forks connection returns all direct forks whereas the forkCount includes all forks in the entire network.

I hope that helps clarify the issue!