DependencyGraphManifest no difference between 0 totalCount and graph not enabled

In the current preview of the V4 API, there is no current way to know whether or not a repo has any dependencies, or whether it has the dependency graph turned off.

Is there any intention of adding this functionality in? It would be super useful for us.

e.g. the following two queries

query {
  organization(login: "some-org") {
    repository(name: "a-repo-with-no-dependencies") {
      dependencyGraphManifests {
        nodes {
          parseable
          filename
        }
        totalCount
      }
    }
  }
}

query {
  organization(login: "some-org") {
    repository(name: "a-repo-with-dependencies-but-graph-turned-off") {
      dependencyGraphManifests {
        nodes {
          parseable
          filename
        }
        totalCount
      }
    }
  }
}

will return the same response:

{
  "data": {
    "organization": {
      "repository": {
        "dependencyGraphManifests": {
          "nodes": [],
          "totalCount": 0
        }
      }
    }
  }
}

Thanks,

Adam.

1 Like

What might be good is hasDependencyGraphEnabled

like the hasIssuesEnabled which exists already on repository.

Hoping this might come before dependencyGraphManifests comes out of Preview.