GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add GraphQL pagination via @octokit/plugin-paginate-graphql by KR-Ravindra · Pull Request #729 · actions/github-script

Conversation

@KR-Ravindra

@KR-Ravindra KR-Ravindra commented Sep 13, 2026

Copy link
Copy Markdown

Problem

github.paginate handles REST pagination, but scripts that page GraphQL results still have to hand-roll cursor loops. #309 asks to include @octokit/plugin-paginate-graphql by default so github.graphql.paginate works like the REST helper does.

Fix

  • Add @octokit/plugin-paginate-graphql ^6.0.0 (peer @octokit/core >=6, compatible with the v7 core already in use) as a dependency.
  • src/main.ts adds paginateGraphQL to the plugin list of both the pre-built github client and createConfiguredGetOctokit, so secondary clients from the injected getOctokit also get graphql.paginate / graphql.paginate.iterator.
  • README: new "Paginate GraphQL queries" example next to the existing GraphQL example; .licenses/ cache entry for the new package (as done for plugin-request-log); dist/ rebuilt with npm run build.

How tested

  • New __test__/main.test.ts loads src/main.ts with inputs set through INPUT_* env vars and stand-ins for the ESM-only @actions/github / Octokit plugin packages (the CommonJS Jest runtime cannot load them, which is why the existing tests avoid them too). It asserts the primary client and a secondary getOctokit client are both built with retry, requestLog, paginateGraphQL.
    • Before (upstream main.ts): both assertions fail, getOctokit received only retry, requestLog.
    • After: 5 suites, 37 tests pass; npm run style:check clean.
  • New integration.yml job test-graphql-paginate walks two pages of issues with github.graphql.paginate.iterator against the real API and checks both github and a getOctokit secondary client expose graphql.paginate.
  • Ran the rebuilt dist/index.js locally with a dummy token: typeof github.graphql.paginate and typeof getOctokit('t').graphql.paginate both return function; the previous build fails with Cannot read properties of undefined (reading 'iterator').

Links

  • Add support for graphql pagination #309
  • https://github.com/octokit/plugin-paginate-graphql.js

This change was prepared with an AI agent operated by KR-Ravindra, who reviewed and tested it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@KR-Ravindra
Add GraphQL pagination via @octokit/plugin-paginate-graphql
cbe9557
Include the paginate-graphql Octokit plugin by default so scripts can
call github.graphql.paginate / github.graphql.paginate.iterator instead
of hand-rolling cursor loops, mirroring github.paginate for REST.

The plugin is added to both the pre-built github client and the
secondary clients created through the injected getOctokit. Adds a
README example, a licensed cache entry, an integration job, and
rebuilds dist/.

Refs actions#309
@KR-Ravindra
KR-Ravindra marked this pull request as ready for review September 13, 2026 09:05
@KR-Ravindra
KR-Ravindra requested a review from a team as a code owner September 13, 2026 09:05
Copilot AI lite review requested due to automatic review settings September 13, 2026 09:05
Copilot AI reviewed Sep 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@haarg haarg mentioned this pull request Oct 30, 2026
ci: reject merge and autosquash commits Perl/perl5#25010
Merged

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@KR-Ravindra
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.