Closed palash25 closed 4 years ago
I am facing the same issue, and would be glad if someone could help as well.
@palash25 I immediately found the solution by carefully reading the documentation on pagination
see here, and it worked like a charm.
@palash25 you may want to close this issue.
variables := map[string]interface{}{
"repositoryOwner": githubv4.String(owner),
"repositoryName": githubv4.String(name),
"issueNumber": githubv4.Int(issue),
"commentsCursor": (*githubv4.String)(nil), // Null after argument to get first page.
}
thanks @ichn-hu
I am trying to fetch all the PRs in a repo, I start with this struct to make my first request
with these options
and once I make the first request I make subsequent requests using the endCursor obtained from the first one to get the PRs after that like this
The only difference between these two is that one uses an endcursor and one doesn't, if there was a way to pass a null for the after tag I would be able to reduce the two structs to just one and reuse it, is there anyway to do that?