KnpLabs / KnpLabs/php-github-api

Github\ResultPager doesn't support GraphQL

Open
#1,153 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
2.2k
Forks
587
PR merge metrics
No merged PRs in 30d

Description

This type of thing could/should work too.

```php
$response = $pager->fetchAll($this->client->graphql(), 'execute', [
'query' => 'query ($login: String!, $perPage: Int!) {
user(login: $login) {
repositories(first: $perPage, orderBy: {field: UPDATED_AT, direction: DESC}) {
nodes {
id
}
pageInfo {
hasNextPage
endCursor
}
}
}
}',
'variables' => [
'login' => 'torvalds',
'perPage' => 10,
],
]);
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the Github\ResultPager entry point and trace the fetchAll call shown with client->graphql() and execute. Done means the pager supports the supplied GraphQL query and follows its pageInfo and endCursor values to retrieve all repository pages.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, php
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.