Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@octokit/plugin-paginate-graphql

Package Overview
Dependencies
Maintainers
4
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/plugin-paginate-graphql - npm Package Compare versions

Comparing version 4.0.0 to 5.0.0-beta.1

6

dist-node/index.js

@@ -23,3 +23,3 @@ "use strict";

__export(dist_src_exports, {
paginateGraphql: () => paginateGraphql
paginateGraphQL: () => paginateGraphQL
});

@@ -201,3 +201,3 @@ module.exports = __toCommonJS(dist_src_exports);

// pkg/dist-src/index.js
function paginateGraphql(octokit) {
function paginateGraphQL(octokit) {
octokit.graphql;

@@ -214,3 +214,3 @@ return {

0 && (module.exports = {
paginateGraphql
paginateGraphQL
});
import { Octokit } from "@octokit/core";
import { createIterator } from "./iterator";
import { createPaginate } from "./paginate";
function paginateGraphql(octokit) {
function paginateGraphQL(octokit) {
octokit.graphql;

@@ -15,3 +15,3 @@ return {

export {
paginateGraphql
paginateGraphQL
};
import { Octokit } from "@octokit/core";
export type { PageInfoForward, PageInfoBackward } from "./page-info";
export declare function paginateGraphql(octokit: Octokit): {
export declare function paginateGraphQL(octokit: Octokit): {
graphql: import("@octokit/graphql/dist-types/types").graphql & {

@@ -5,0 +5,0 @@ paginate: (<ResponseType_1 extends object = any>(query: string, initialParameters?: Record<string, any>) => Promise<ResponseType_1>) & {

@@ -176,3 +176,3 @@ // pkg/dist-src/index.js

// pkg/dist-src/index.js
function paginateGraphql(octokit) {
function paginateGraphQL(octokit) {
octokit.graphql;

@@ -188,3 +188,3 @@ return {

export {
paginateGraphql
paginateGraphQL
};

@@ -6,3 +6,3 @@ {

},
"version": "4.0.0",
"version": "5.0.0-beta.1",
"description": "Octokit plugin to paginate GraphQL API endpoint responses",

@@ -23,13 +23,13 @@ "main": "dist-node/index.js",

"@octokit/core": "^5.0.0",
"@octokit/plugin-rest-endpoint-methods": "^9.0.0",
"@octokit/plugin-rest-endpoint-methods": "^10.0.0",
"@octokit/tsconfig": "^2.0.0",
"@types/fetch-mock": "^7.3.1",
"@types/jest": "^29.0.0",
"@types/node": "^18.0.0",
"esbuild": "^0.18.0",
"fetch-mock": "^9.0.0",
"@types/node": "^20.0.0",
"esbuild": "^0.20.0",
"fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1",
"glob": "^10.2.6",
"jest": "^29.0.0",
"npm-run-all": "^4.1.5",
"prettier": "3.0.0",
"npm-run-all2": "^6.0.0",
"prettier": "3.2.5",
"semantic-release-plugin-update-version-in-files": "^1.0.0",

@@ -36,0 +36,0 @@ "ts-jest": "^29.0.0",

@@ -21,3 +21,3 @@ # plugin-paginate-graphql.js

import { Octokit } from "https://esm.sh/@octokit/core";
import { paginateGraphql } from "https://esm.sh/@octokit/plugin-paginate-graphql";
import { paginateGraphQL } from "https://esm.sh/@octokit/plugin-paginate-graphql";
</script>

@@ -35,3 +35,3 @@ ```

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

@@ -44,3 +44,3 @@

```js
const MyOctokit = Octokit.plugin(paginateGraphql);
const MyOctokit = Octokit.plugin(paginateGraphQL);
const octokit = new MyOctokit({ auth: "secret123" });

@@ -67,3 +67,3 @@

There are two convetions this plugin relies on:
There are two conventions this plugin relies on:

@@ -75,7 +75,7 @@ 1. The name of the cursor variable must be `$cursor`

The `paginateGraphql` plugin adds a new `octokit.graphql.paginate()` method which accepts a query with a single `$cursor` variable that is used to paginate.
The `paginateGraphQL` plugin adds a new `octokit.graphql.paginate()` method which accepts a query with a single `$cursor` variable that is used to paginate.
The query gets passed over to the `octokit.graphql()`-function. The response is then scanned for the required `pageInfo`-object. If `hasNextPage` is `true`, it will automatically use the `endCursor` to execute the next query until `hasNextPage` is `false`.
While iterating, it ongoingly merges all `nodes` and/or `edges` of all responses and returns a combined response in the end.
While iterating, it continually merges all `nodes` and/or `edges` of all responses and returns a combined response in the end.

@@ -167,3 +167,3 @@ > **Warning**

You can control the pagination direction by the properties deinfed in the `pageInfo` resource.
You can control the pagination direction by the properties defined in the `pageInfo` resource.

@@ -192,3 +192,3 @@ For a forward pagination, use:

Nested pagination with GraphlQL is complicated, so the following **is not supported**:
Nested pagination with GraphQL is complicated, so the following **is not supported**:

@@ -228,3 +228,3 @@ ```js

You can type the response of the `paginateGraphql()` and `iterator()` functions like this:
You can type the response of the `paginateGraphQL()` and `iterator()` functions like this:

@@ -231,0 +231,0 @@ ```ts

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc