Initial Save
This commit is contained in:
18
node_modules/apollo-utilities/lib/util/errorHandling.js
generated
vendored
Normal file
18
node_modules/apollo-utilities/lib/util/errorHandling.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"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
|
||||
Reference in New Issue
Block a user