mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
14 lines
338 B
JavaScript
14 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
|
|
}
|