change-string-case/node_modules/@octokit/graphql/dist-src/with-defaults.js
Alex Szczuczko d0603cd0a7 npm install
2023-10-25 14:27:07 -06:00

16 lines
435 B
JavaScript

import { request as Request } from "@octokit/request";
import { graphql } from "./graphql";
function withDefaults(request, newDefaults) {
const newRequest = request.defaults(newDefaults);
const newApi = (query, options) => {
return graphql(newRequest, query, options);
};
return Object.assign(newApi, {
defaults: withDefaults.bind(null, newRequest),
endpoint: newRequest.endpoint
});
}
export {
withDefaults
};