octokit.graphql.net
octokit.graphql.net copied to clipboard
AllPages throws when used on SecurityVulnerabilities
Hitting this guy: https://developer.github.com/v4/object/securityvulnerability/
Like so:
var query = new Query()
.SecurityVulnerabilities(10, null, null, null, SecurityAdvisoryEcosystem.Rubygems, null)
.AllPages(100)
.Select(vuln => new
{
vuln.FirstPatchedVersion.Identifier,
vuln.Package.Name,
vuln.Package.Ecosystem,
vuln.Severity,
vuln.VulnerableVersionRange
})
.Compile();
var result = await connection.Run(query);
Produces:

I'm assuming that in other cases there is a "secret" Id field added at the front of the list, and it's not present here.
I don't know if a schema update might fix this?
There's a PR with one here https://github.com/octokit/octokit.graphql.net/pull/211. You could compile and pull in the DLLs or nupkg from that.
@jcansdale I tried on your branch, same issue. I can't really tell without more inspection if the id selection part is just option, that is "If we don't find it should we just skip it?". If so I can commit something doing that.
Re your query:
var query = new Query()
.SecurityVulnerabilities(10, null, null, null, SecurityAdvisoryEcosystem.Rubygems, null)
.AllPages(100)
I didn't think you needed to set the first when using AllPages.
Could you try the following:
var query = new Query()
.SecurityVulnerabilities(null, null, null, null, SecurityAdvisoryEcosystem.Rubygems, null)
.AllPages(100)
Gave it a try, it doesn't impact the behavior at all.
👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!