gr2m / gr2m/github-api-wishlist
GraphQL: Create a generic query node type for pagination
Open
- Dominant language
- No language data
- Stars
- 7
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
GitHub's current GraphQL API supports a generic `query.resource` type:
```js
query {
resource(url:"https://github.com/gr2m/sandbox") {
... on Repository {
nameWithOwner
}
}
}
```
It would be great to have a generic node type that would allow for pagination.
```js
query($cursor: String) {
paginate(first: 100, after: $cursor) {
pageInfo {
endCursor
hasNextPage
}
nodes {
... on Repository {
nameWithOwner
}
}
}
}
```
That would greatly simplify to paginate complex queries with multiple, nested paginations
Contributor guide
Assessment
This issue has not been assessed yet.