我正在使用 Github API v4 运行搜索查询。
从 API 文档中,我可以理解以下查询为我提供了 pageInfo,但我不知道如何使用它来遍历。
query {
search(first: 100, type:USER, query:"location:usa repos:>0 language:java") {
pageInfo {
startCursor
hasNextPage
endCursor
}
userCount
nodes {
... on User {
bio
company
email
id
isBountyHunter
isCampusExpert
isDeveloperProgramMember
isEmployee
isHireable
isSiteAdmin
isViewer
location
login
name
url
websiteUrl
}
}
}
}
回应是:
{
"data": {
"search": {
"pageInfo": {
"startCursor": "Y3Vyc29yOjE=",
"hasNextPage": true,
"endCursor": "Y3Vyc29yOjEwMA=="
},
...
}