1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.locatedError = locatedError;
|
7 |
|
8 | var _GraphQLError = require("./GraphQLError");
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | function locatedError(originalError, nodes, path) {
|
16 |
|
17 |
|
18 | if (originalError && Array.isArray(originalError.path)) {
|
19 | return originalError;
|
20 | }
|
21 |
|
22 | return new _GraphQLError.GraphQLError(originalError && originalError.message, originalError && originalError.nodes || nodes, originalError && originalError.source, originalError && originalError.positions, path, originalError);
|
23 | }
|