MessagesForMacintosh/JS/node_modules/apollo-utilities/lib/util/errorHandling.js

18 lines
486 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function tryFunctionOrLogError(f) {
try {
return f();
}
catch (e) {
if (console.error) {
console.error(e);
}
}
}
exports.tryFunctionOrLogError = tryFunctionOrLogError;
function graphQLResultHasError(result) {
return result.errors && result.errors.length;
}
exports.graphQLResultHasError = graphQLResultHasError;
//# sourceMappingURL=errorHandling.js.map