wishthis/node_modules/@octokit/graphql/dist-src/index.js

19 lines
568 B
JavaScript
Raw Normal View History

2022-01-21 08:28:41 +00:00
import { request } from "@octokit/request";
import { getUserAgent } from "universal-user-agent";
import { VERSION } from "./version";
import { withDefaults } from "./with-defaults";
export const graphql = withDefaults(request, {
headers: {
"user-agent": `octokit-graphql.js/${VERSION} ${getUserAgent()}`,
},
method: "POST",
url: "/graphql",
});
export { GraphqlResponseError } from "./error";
export function withCustomRequest(customRequest) {
return withDefaults(customRequest, {
method: "POST",
url: "/graphql",
});
}