backport
Version:
A CLI tool that automates the process of backporting commits
21 lines • 852 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.loggingExchange = void 0;
const printer_1 = require("graphql/language/printer");
const wonka_1 = require("wonka");
const logger_1 = require("../../../logger");
const loggingExchange = ({ forward }) => (ops$) => {
return (0, wonka_1.pipe)(ops$, (0, wonka_1.tap)((operation) => {
logger_1.logger.verbose('Query:', (0, printer_1.print)(operation.query));
logger_1.logger.verbose('Variables:', operation.variables);
}), forward, (0, wonka_1.tap)((result) => {
if (result.error) {
logger_1.logger.error('GraphQL Error:', result.error);
}
else {
logger_1.logger.verbose('Data:', result.data);
}
}));
};
exports.loggingExchange = loggingExchange;
//# sourceMappingURL=loggingExchange.js.map