Socket
Book a DemoInstallSign in
Socket

@octokit/plugin-paginate-graphql

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/plugin-paginate-graphql

Octokit plugin to paginate GraphQL API endpoint responses

latest
Source
npmnpm
Version
6.0.0
Version published
Weekly downloads
842K
-4.44%
Maintainers
1
Weekly downloads
 
Created

What is @octokit/plugin-paginate-graphql?

@octokit/plugin-paginate-graphql is a plugin for the Octokit library that simplifies the process of paginating through GitHub's GraphQL API responses. It allows developers to easily handle large sets of data that are returned in multiple pages by automatically fetching all pages of results.

What are @octokit/plugin-paginate-graphql's main functionalities?

Automatic Pagination

This feature allows you to automatically paginate through all pages of a GraphQL query. The code sample demonstrates how to fetch all issues from a GitHub repository using the paginateGraphql method.

const { Octokit } = require('@octokit/core');
const { paginateGraphql } = require('@octokit/plugin-paginate-graphql');

const MyOctokit = Octokit.plugin(paginateGraphql);
const octokit = new MyOctokit({ auth: 'your-token' });

async function fetchAllIssues() {
  const query = `
    query($cursor: String) {
      repository(owner: "owner", name: "repo") {
        issues(first: 100, after: $cursor) {
          nodes {
            title
            number
          }
          pageInfo {
            endCursor
            hasNextPage
          }
        }
      }
    }
  `;

  const issues = await octokit.paginateGraphql(query);
  console.log(issues);
}

fetchAllIssues();

Other packages similar to @octokit/plugin-paginate-graphql

Keywords

github

FAQs

Package last updated on 20 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts