@depup/octokit__graphql 9.0.3-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2018 Octokit contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # @depup/octokit__graphql
2
+
3
+ > Dependency-bumped version of [@octokit/graphql](https://www.npmjs.com/package/@octokit/graphql)
4
+
5
+ Generated by [DepUp](https://github.com/depup/npm) -- all production
6
+ dependencies bumped to latest versions.
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ npm install @depup/octokit__graphql
12
+ ```
13
+
14
+ | Field | Value |
15
+ |-------|-------|
16
+ | Original | [@octokit/graphql](https://www.npmjs.com/package/@octokit/graphql) @ 9.0.3 |
17
+ | Processed | 2026-03-17 |
18
+ | Smoke test | passed |
19
+ | Deps updated | 2 |
20
+
21
+ ## Dependency Changes
22
+
23
+ | Dependency | From | To |
24
+ |------------|------|-----|
25
+ | @octokit/request | ^10.0.6 | ^10.0.8 |
26
+ | universal-user-agent | ^7.0.0 | ^7.0.3 |
27
+
28
+ ---
29
+
30
+ Source: https://github.com/depup/npm | Original: https://www.npmjs.com/package/@octokit/graphql
31
+
32
+ License inherited from the original package.
package/changes.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "bumped": {
3
+ "@octokit/request": {
4
+ "from": "^10.0.6",
5
+ "to": "^10.0.8"
6
+ },
7
+ "universal-user-agent": {
8
+ "from": "^7.0.0",
9
+ "to": "^7.0.3"
10
+ }
11
+ },
12
+ "timestamp": "2026-03-17T16:32:22.747Z",
13
+ "totalUpdated": 2
14
+ }
@@ -0,0 +1,129 @@
1
+ // pkg/dist-src/index.js
2
+ import { request } from "@octokit/request";
3
+ import { getUserAgent } from "universal-user-agent";
4
+
5
+ // pkg/dist-src/version.js
6
+ var VERSION = "0.0.0-development";
7
+
8
+ // pkg/dist-src/with-defaults.js
9
+ import { request as Request2 } from "@octokit/request";
10
+
11
+ // pkg/dist-src/graphql.js
12
+ import { request as Request } from "@octokit/request";
13
+
14
+ // pkg/dist-src/error.js
15
+ function _buildMessageForResponseErrors(data) {
16
+ return `Request failed due to following response errors:
17
+ ` + data.errors.map((e) => ` - ${e.message}`).join("\n");
18
+ }
19
+ var GraphqlResponseError = class extends Error {
20
+ constructor(request2, headers, response) {
21
+ super(_buildMessageForResponseErrors(response));
22
+ this.request = request2;
23
+ this.headers = headers;
24
+ this.response = response;
25
+ this.errors = response.errors;
26
+ this.data = response.data;
27
+ if (Error.captureStackTrace) {
28
+ Error.captureStackTrace(this, this.constructor);
29
+ }
30
+ }
31
+ name = "GraphqlResponseError";
32
+ errors;
33
+ data;
34
+ };
35
+
36
+ // pkg/dist-src/graphql.js
37
+ var NON_VARIABLE_OPTIONS = [
38
+ "method",
39
+ "baseUrl",
40
+ "url",
41
+ "headers",
42
+ "request",
43
+ "query",
44
+ "mediaType",
45
+ "operationName"
46
+ ];
47
+ var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
48
+ var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
49
+ function graphql(request2, query, options) {
50
+ if (options) {
51
+ if (typeof query === "string" && "query" in options) {
52
+ return Promise.reject(
53
+ new Error(`[@octokit/graphql] "query" cannot be used as variable name`)
54
+ );
55
+ }
56
+ for (const key in options) {
57
+ if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;
58
+ return Promise.reject(
59
+ new Error(
60
+ `[@octokit/graphql] "${key}" cannot be used as variable name`
61
+ )
62
+ );
63
+ }
64
+ }
65
+ const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query;
66
+ const requestOptions = Object.keys(
67
+ parsedOptions
68
+ ).reduce((result, key) => {
69
+ if (NON_VARIABLE_OPTIONS.includes(key)) {
70
+ result[key] = parsedOptions[key];
71
+ return result;
72
+ }
73
+ if (!result.variables) {
74
+ result.variables = {};
75
+ }
76
+ result.variables[key] = parsedOptions[key];
77
+ return result;
78
+ }, {});
79
+ const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl;
80
+ if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {
81
+ requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql");
82
+ }
83
+ return request2(requestOptions).then((response) => {
84
+ if (response.data.errors) {
85
+ const headers = {};
86
+ for (const key of Object.keys(response.headers)) {
87
+ headers[key] = response.headers[key];
88
+ }
89
+ throw new GraphqlResponseError(
90
+ requestOptions,
91
+ headers,
92
+ response.data
93
+ );
94
+ }
95
+ return response.data.data;
96
+ });
97
+ }
98
+
99
+ // pkg/dist-src/with-defaults.js
100
+ function withDefaults(request2, newDefaults) {
101
+ const newRequest = request2.defaults(newDefaults);
102
+ const newApi = (query, options) => {
103
+ return graphql(newRequest, query, options);
104
+ };
105
+ return Object.assign(newApi, {
106
+ defaults: withDefaults.bind(null, newRequest),
107
+ endpoint: newRequest.endpoint
108
+ });
109
+ }
110
+
111
+ // pkg/dist-src/index.js
112
+ var graphql2 = withDefaults(request, {
113
+ headers: {
114
+ "user-agent": `octokit-graphql.js/${VERSION} ${getUserAgent()}`
115
+ },
116
+ method: "POST",
117
+ url: "/graphql"
118
+ });
119
+ function withCustomRequest(customRequest) {
120
+ return withDefaults(customRequest, {
121
+ method: "POST",
122
+ url: "/graphql"
123
+ });
124
+ }
125
+ export {
126
+ GraphqlResponseError,
127
+ graphql2 as graphql,
128
+ withCustomRequest
129
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../dist-src/index.js", "../dist-src/version.js", "../dist-src/with-defaults.js", "../dist-src/graphql.js", "../dist-src/error.js"],
4
+ "sourcesContent": ["import { request } from \"@octokit/request\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version.js\";\nimport { withDefaults } from \"./with-defaults.js\";\nconst graphql = withDefaults(request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${getUserAgent()}`\n },\n method: \"POST\",\n url: \"/graphql\"\n});\nimport { GraphqlResponseError } from \"./error.js\";\nfunction withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\"\n });\n}\nexport {\n GraphqlResponseError,\n graphql,\n withCustomRequest\n};\n", "const VERSION = \"0.0.0-development\";\nexport {\n VERSION\n};\n", "import { request as Request } from \"@octokit/request\";\nimport { graphql } from \"./graphql.js\";\nfunction withDefaults(request, newDefaults) {\n const newRequest = request.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: newRequest.endpoint\n });\n}\nexport {\n withDefaults\n};\n", "import { request as Request } from \"@octokit/request\";\nimport { GraphqlResponseError } from \"./error.js\";\nconst NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\",\n \"operationName\"\n];\nconst FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nconst GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nfunction graphql(request, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(\n new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`)\n );\n }\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;\n return Promise.reject(\n new Error(\n `[@octokit/graphql] \"${key}\" cannot be used as variable name`\n )\n );\n }\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(\n parsedOptions\n ).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlResponseError(\n requestOptions,\n headers,\n response.data\n );\n }\n return response.data.data;\n });\n}\nexport {\n graphql\n};\n", "function _buildMessageForResponseErrors(data) {\n return `Request failed due to following response errors:\n` + data.errors.map((e) => ` - ${e.message}`).join(\"\\n\");\n}\nclass GraphqlResponseError extends Error {\n constructor(request, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request;\n this.headers = headers;\n this.response = response;\n this.errors = response.errors;\n this.data = response.data;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\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CAAC;AAAA,EAC/D;AAAA,EACA,QAAQ;AAAA,EACR,KAAK;AACP,CAAC;AAED,SAAS,kBAAkB,eAAe;AACxC,SAAO,aAAa,eAAe;AAAA,IACjC,QAAQ;AAAA,IACR,KAAK;AAAA,EACP,CAAC;AACH;",
6
+ "names": ["Request", "request", "request", "request", "graphql"]
7
+ }
@@ -0,0 +1,23 @@
1
+ function _buildMessageForResponseErrors(data) {
2
+ return `Request failed due to following response errors:
3
+ ` + data.errors.map((e) => ` - ${e.message}`).join("\n");
4
+ }
5
+ class GraphqlResponseError extends Error {
6
+ constructor(request, headers, response) {
7
+ super(_buildMessageForResponseErrors(response));
8
+ this.request = request;
9
+ this.headers = headers;
10
+ this.response = response;
11
+ this.errors = response.errors;
12
+ this.data = response.data;
13
+ if (Error.captureStackTrace) {
14
+ Error.captureStackTrace(this, this.constructor);
15
+ }
16
+ }
17
+ name = "GraphqlResponseError";
18
+ errors;
19
+ data;
20
+ }
21
+ export {
22
+ GraphqlResponseError
23
+ };
@@ -0,0 +1,66 @@
1
+ import { request as Request } from "@octokit/request";
2
+ import { GraphqlResponseError } from "./error.js";
3
+ const NON_VARIABLE_OPTIONS = [
4
+ "method",
5
+ "baseUrl",
6
+ "url",
7
+ "headers",
8
+ "request",
9
+ "query",
10
+ "mediaType",
11
+ "operationName"
12
+ ];
13
+ const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
14
+ const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
15
+ function graphql(request, query, options) {
16
+ if (options) {
17
+ if (typeof query === "string" && "query" in options) {
18
+ return Promise.reject(
19
+ new Error(`[@octokit/graphql] "query" cannot be used as variable name`)
20
+ );
21
+ }
22
+ for (const key in options) {
23
+ if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;
24
+ return Promise.reject(
25
+ new Error(
26
+ `[@octokit/graphql] "${key}" cannot be used as variable name`
27
+ )
28
+ );
29
+ }
30
+ }
31
+ const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query;
32
+ const requestOptions = Object.keys(
33
+ parsedOptions
34
+ ).reduce((result, key) => {
35
+ if (NON_VARIABLE_OPTIONS.includes(key)) {
36
+ result[key] = parsedOptions[key];
37
+ return result;
38
+ }
39
+ if (!result.variables) {
40
+ result.variables = {};
41
+ }
42
+ result.variables[key] = parsedOptions[key];
43
+ return result;
44
+ }, {});
45
+ const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;
46
+ if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {
47
+ requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql");
48
+ }
49
+ return request(requestOptions).then((response) => {
50
+ if (response.data.errors) {
51
+ const headers = {};
52
+ for (const key of Object.keys(response.headers)) {
53
+ headers[key] = response.headers[key];
54
+ }
55
+ throw new GraphqlResponseError(
56
+ requestOptions,
57
+ headers,
58
+ response.data
59
+ );
60
+ }
61
+ return response.data.data;
62
+ });
63
+ }
64
+ export {
65
+ graphql
66
+ };
@@ -0,0 +1,23 @@
1
+ import { request } from "@octokit/request";
2
+ import { getUserAgent } from "universal-user-agent";
3
+ import { VERSION } from "./version.js";
4
+ import { withDefaults } from "./with-defaults.js";
5
+ const graphql = withDefaults(request, {
6
+ headers: {
7
+ "user-agent": `octokit-graphql.js/${VERSION} ${getUserAgent()}`
8
+ },
9
+ method: "POST",
10
+ url: "/graphql"
11
+ });
12
+ import { GraphqlResponseError } from "./error.js";
13
+ function withCustomRequest(customRequest) {
14
+ return withDefaults(customRequest, {
15
+ method: "POST",
16
+ url: "/graphql"
17
+ });
18
+ }
19
+ export {
20
+ GraphqlResponseError,
21
+ graphql,
22
+ withCustomRequest
23
+ };
@@ -0,0 +1,4 @@
1
+ const VERSION = "9.0.3";
2
+ export {
3
+ VERSION
4
+ };
@@ -0,0 +1,15 @@
1
+ import { request as Request } from "@octokit/request";
2
+ import { graphql } from "./graphql.js";
3
+ function withDefaults(request, newDefaults) {
4
+ const newRequest = request.defaults(newDefaults);
5
+ const newApi = (query, options) => {
6
+ return graphql(newRequest, query, options);
7
+ };
8
+ return Object.assign(newApi, {
9
+ defaults: withDefaults.bind(null, newRequest),
10
+ endpoint: newRequest.endpoint
11
+ });
12
+ }
13
+ export {
14
+ withDefaults
15
+ };
@@ -0,0 +1,13 @@
1
+ import type { ResponseHeaders } from "@octokit/types";
2
+ import type { GraphQlEndpointOptions, GraphQlQueryResponse } from "./types.js";
3
+ type ServerResponseData<T> = Required<GraphQlQueryResponse<T>>;
4
+ export declare class GraphqlResponseError<ResponseData> extends Error {
5
+ readonly request: GraphQlEndpointOptions;
6
+ readonly headers: ResponseHeaders;
7
+ readonly response: ServerResponseData<ResponseData>;
8
+ name: string;
9
+ readonly errors: GraphQlQueryResponse<never>["errors"];
10
+ readonly data: ResponseData;
11
+ constructor(request: GraphQlEndpointOptions, headers: ResponseHeaders, response: ServerResponseData<ResponseData>);
12
+ }
13
+ export {};
@@ -0,0 +1,3 @@
1
+ import { request as Request } from "@octokit/request";
2
+ import type { RequestParameters, GraphQlQueryResponseData } from "./types.js";
3
+ export declare function graphql<ResponseData = GraphQlQueryResponseData>(request: typeof Request, query: string | RequestParameters, options?: RequestParameters): Promise<ResponseData>;
@@ -0,0 +1,5 @@
1
+ import { request } from "@octokit/request";
2
+ export declare const graphql: import("./types.js").graphql;
3
+ export type { GraphQlQueryResponseData } from "./types.js";
4
+ export { GraphqlResponseError } from "./error.js";
5
+ export declare function withCustomRequest(customRequest: typeof request): import("./types.js").graphql;
@@ -0,0 +1,55 @@
1
+ import type { EndpointOptions, RequestParameters as RequestParametersType, EndpointInterface } from "@octokit/types";
2
+ export type GraphQlEndpointOptions = EndpointOptions & {
3
+ variables?: {
4
+ [key: string]: unknown;
5
+ };
6
+ };
7
+ export type RequestParameters = RequestParametersType;
8
+ export type Query = string;
9
+ export interface graphql {
10
+ /**
11
+ * Sends a GraphQL query request based on endpoint options
12
+ * The GraphQL query must be specified in `options`.
13
+ *
14
+ * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
15
+ */
16
+ <ResponseData>(options: RequestParameters): GraphQlResponse<ResponseData>;
17
+ /**
18
+ * Sends a GraphQL query request based on endpoint options
19
+ *
20
+ * @param {string} query GraphQL query. Example: `'query { viewer { login } }'`.
21
+ * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
22
+ */
23
+ <ResponseData>(query: Query, parameters?: RequestParameters): GraphQlResponse<ResponseData>;
24
+ /**
25
+ * Returns a new `endpoint` with updated route and parameters
26
+ */
27
+ defaults: (newDefaults: RequestParameters) => graphql;
28
+ /**
29
+ * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint}
30
+ */
31
+ endpoint: EndpointInterface;
32
+ }
33
+ export type GraphQlResponse<ResponseData> = Promise<ResponseData>;
34
+ export type GraphQlQueryResponseData = {
35
+ [key: string]: any;
36
+ };
37
+ export type GraphQlQueryResponse<ResponseData> = {
38
+ data: ResponseData;
39
+ errors?: [
40
+ {
41
+ type: string;
42
+ message: string;
43
+ path: [string];
44
+ extensions: {
45
+ [key: string]: any;
46
+ };
47
+ locations: [
48
+ {
49
+ line: number;
50
+ column: number;
51
+ }
52
+ ];
53
+ }
54
+ ];
55
+ };
@@ -0,0 +1 @@
1
+ export declare const VERSION = "9.0.3";
@@ -0,0 +1,3 @@
1
+ import { request as Request } from "@octokit/request";
2
+ import type { graphql as ApiInterface, RequestParameters } from "./types.js";
3
+ export declare function withDefaults(request: typeof Request, newDefaults: RequestParameters): ApiInterface;
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "@depup/octokit__graphql",
3
+ "version": "9.0.3-depup.0",
4
+ "type": "module",
5
+ "description": "[DepUp] GitHub GraphQL API client for browsers and Node",
6
+ "repository": "github:octokit/graphql.js",
7
+ "keywords": [
8
+ "depup",
9
+ "dependency-bumped",
10
+ "updated-deps",
11
+ "@octokit/graphql",
12
+ "octokit",
13
+ "github",
14
+ "api",
15
+ "graphql"
16
+ ],
17
+ "author": "Gregor Martynus (https://github.com/gr2m)",
18
+ "license": "MIT",
19
+ "dependencies": {
20
+ "@octokit/request": "^10.0.8",
21
+ "@octokit/types": "^16.0.0",
22
+ "universal-user-agent": "^7.0.3"
23
+ },
24
+ "devDependencies": {
25
+ "@octokit/tsconfig": "^4.0.0",
26
+ "@types/node": "^24.0.0",
27
+ "@vitest/coverage-v8": "^3.0.0",
28
+ "esbuild": "^0.25.0",
29
+ "fetch-mock": "^12.0.0",
30
+ "glob": "^11.0.0",
31
+ "prettier": "3.6.2",
32
+ "semantic-release-plugin-update-version-in-files": "^2.0.0",
33
+ "typescript": "^5.3.0",
34
+ "vitest": "^3.0.0"
35
+ },
36
+ "engines": {
37
+ "node": ">= 20"
38
+ },
39
+ "files": [
40
+ "dist-*/**",
41
+ "bin/**",
42
+ "changes.json",
43
+ "README.md"
44
+ ],
45
+ "types": "./dist-types/index.d.ts",
46
+ "exports": {
47
+ ".": {
48
+ "types": "./dist-types/index.d.ts",
49
+ "import": "./dist-bundle/index.js",
50
+ "default": "./dist-bundle/index.js"
51
+ },
52
+ "./types": {
53
+ "types": "./dist-types/types.d.ts"
54
+ }
55
+ },
56
+ "sideEffects": false,
57
+ "depup": {
58
+ "changes": {
59
+ "@octokit/request": {
60
+ "from": "^10.0.6",
61
+ "to": "^10.0.8"
62
+ },
63
+ "universal-user-agent": {
64
+ "from": "^7.0.0",
65
+ "to": "^7.0.3"
66
+ }
67
+ },
68
+ "depsUpdated": 2,
69
+ "originalPackage": "@octokit/graphql",
70
+ "originalVersion": "9.0.3",
71
+ "processedAt": "2026-03-17T16:32:28.475Z",
72
+ "smokeTest": "passed"
73
+ }
74
+ }