mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2024-11-28 01:01:03 -05:00
13 lines
338 B
JavaScript
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
|
|
}
|