github.com/jfrog/frogbot@v1.1.1-0.20231221090046-821a26f50338/action/node_modules/@octokit/graphql/dist-src/with-defaults.js (about) 1 import { request as Request } from "@octokit/request"; 2 import { graphql } from "./graphql"; 3 export 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: Request.endpoint, 11 }); 12 }