setup-node/node_modules/@octokit/graphql/lib/with-defaults.js
Danny McCormick 5273d0df9c Add auth
2019-08-06 18:29:44 -04:00

13 lines
338 B
JavaScript

module.exports = withDefaults
const graphql = require('./graphql')
function withDefaults (request, newDefaults) {
const newRequest = request.defaults(newDefaults)
const newApi = function (query, options) {
return graphql(newRequest, query, options)
}
newApi.defaults = withDefaults.bind(null, newRequest)
return newApi
}