aws-delivlib
Version:
A fabulous library for defining continuous pipelines for building, testing and releasing code libraries.
15 lines (14 loc) • 380 B
JavaScript
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
};