@graphql-tools/utils 9.2.1 → 10.0.0-alpha-20230515174415-d29a8b3b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/executor.js +0 -2
- package/cjs/index.js +0 -1
- package/cjs/inspect.js +1 -2
- package/cjs/loaders.js +0 -2
- package/esm/executor.js +0 -1
- package/esm/index.js +0 -1
- package/esm/inspect.js +1 -2
- package/esm/loaders.js +0 -1
- package/package.json +1 -1
- package/typings/index.d.cts +0 -1
- package/typings/index.d.ts +0 -1
- package/typings/loaders.d.cts +1 -0
- package/typings/loaders.d.ts +1 -0
- package/cjs/AggregateError.js +0 -25
- package/esm/AggregateError.js +0 -21
- package/typings/AggregateError.d.cts +0 -11
- package/typings/AggregateError.d.ts +0 -11
package/cjs/executor.js
CHANGED
package/cjs/index.js
CHANGED
|
@@ -44,7 +44,6 @@ tslib_1.__exportStar(require("./isDocumentNode.js"), exports);
|
|
|
44
44
|
tslib_1.__exportStar(require("./astFromValueUntyped.js"), exports);
|
|
45
45
|
tslib_1.__exportStar(require("./executor.js"), exports);
|
|
46
46
|
tslib_1.__exportStar(require("./withCancel.js"), exports);
|
|
47
|
-
tslib_1.__exportStar(require("./AggregateError.js"), exports);
|
|
48
47
|
tslib_1.__exportStar(require("./rootTypes.js"), exports);
|
|
49
48
|
tslib_1.__exportStar(require("./comments.js"), exports);
|
|
50
49
|
tslib_1.__exportStar(require("./collectFields.js"), exports);
|
package/cjs/inspect.js
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.inspect = void 0;
|
|
6
6
|
const graphql_1 = require("graphql");
|
|
7
|
-
const AggregateError_js_1 = require("./AggregateError.js");
|
|
8
7
|
const MAX_RECURSIVE_DEPTH = 3;
|
|
9
8
|
/**
|
|
10
9
|
* Used to print values in error messages.
|
|
@@ -36,7 +35,7 @@ function formatObjectValue(value, previouslySeenValues) {
|
|
|
36
35
|
return 'null';
|
|
37
36
|
}
|
|
38
37
|
if (value instanceof Error) {
|
|
39
|
-
if (
|
|
38
|
+
if (value.name === 'AggregateError') {
|
|
40
39
|
return formatError(value) + '\n' + formatArray(value.errors, previouslySeenValues);
|
|
41
40
|
}
|
|
42
41
|
return formatError(value);
|
package/cjs/loaders.js
CHANGED
package/esm/executor.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/esm/index.js
CHANGED
|
@@ -41,7 +41,6 @@ export * from './isDocumentNode.js';
|
|
|
41
41
|
export * from './astFromValueUntyped.js';
|
|
42
42
|
export * from './executor.js';
|
|
43
43
|
export * from './withCancel.js';
|
|
44
|
-
export * from './AggregateError.js';
|
|
45
44
|
export * from './rootTypes.js';
|
|
46
45
|
export * from './comments.js';
|
|
47
46
|
export * from './collectFields.js';
|
package/esm/inspect.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Taken from graphql-js
|
|
2
2
|
// https://github.com/graphql/graphql-js/blob/main/src/jsutils/inspect.ts
|
|
3
3
|
import { GraphQLError } from 'graphql';
|
|
4
|
-
import { isAggregateError } from './AggregateError.js';
|
|
5
4
|
const MAX_RECURSIVE_DEPTH = 3;
|
|
6
5
|
/**
|
|
7
6
|
* Used to print values in error messages.
|
|
@@ -32,7 +31,7 @@ function formatObjectValue(value, previouslySeenValues) {
|
|
|
32
31
|
return 'null';
|
|
33
32
|
}
|
|
34
33
|
if (value instanceof Error) {
|
|
35
|
-
if (
|
|
34
|
+
if (value.name === 'AggregateError') {
|
|
36
35
|
return formatError(value) + '\n' + formatArray(value.errors, previouslySeenValues);
|
|
37
36
|
}
|
|
38
37
|
return formatError(value);
|
package/esm/loaders.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/package.json
CHANGED
package/typings/index.d.cts
CHANGED
|
@@ -41,7 +41,6 @@ export * from './isDocumentNode.cjs';
|
|
|
41
41
|
export * from './astFromValueUntyped.cjs';
|
|
42
42
|
export * from './executor.cjs';
|
|
43
43
|
export * from './withCancel.cjs';
|
|
44
|
-
export * from './AggregateError.cjs';
|
|
45
44
|
export * from './rootTypes.cjs';
|
|
46
45
|
export * from './comments.cjs';
|
|
47
46
|
export * from './collectFields.cjs';
|
package/typings/index.d.ts
CHANGED
|
@@ -41,7 +41,6 @@ export * from './isDocumentNode.js';
|
|
|
41
41
|
export * from './astFromValueUntyped.js';
|
|
42
42
|
export * from './executor.js';
|
|
43
43
|
export * from './withCancel.js';
|
|
44
|
-
export * from './AggregateError.js';
|
|
45
44
|
export * from './rootTypes.js';
|
|
46
45
|
export * from './comments.js';
|
|
47
46
|
export * from './collectFields.js';
|
package/typings/loaders.d.cts
CHANGED
|
@@ -9,6 +9,7 @@ export interface Source {
|
|
|
9
9
|
export type BaseLoaderOptions = GraphQLParseOptions & BuildSchemaOptions & {
|
|
10
10
|
cwd?: string;
|
|
11
11
|
ignore?: string | string[];
|
|
12
|
+
includeSources?: boolean;
|
|
12
13
|
};
|
|
13
14
|
export type WithList<T> = T | T[];
|
|
14
15
|
export type ElementOf<TList> = TList extends Array<infer TElement> ? TElement : never;
|
package/typings/loaders.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface Source {
|
|
|
9
9
|
export type BaseLoaderOptions = GraphQLParseOptions & BuildSchemaOptions & {
|
|
10
10
|
cwd?: string;
|
|
11
11
|
ignore?: string | string[];
|
|
12
|
+
includeSources?: boolean;
|
|
12
13
|
};
|
|
13
14
|
export type WithList<T> = T | T[];
|
|
14
15
|
export type ElementOf<TList> = TList extends Array<infer TElement> ? TElement : never;
|
package/cjs/AggregateError.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isAggregateError = exports.AggregateError = void 0;
|
|
4
|
-
let AggregateErrorImpl;
|
|
5
|
-
exports.AggregateError = AggregateErrorImpl;
|
|
6
|
-
if (typeof AggregateError === 'undefined') {
|
|
7
|
-
class AggregateErrorClass extends Error {
|
|
8
|
-
constructor(errors, message = '') {
|
|
9
|
-
super(message);
|
|
10
|
-
this.errors = errors;
|
|
11
|
-
this.name = 'AggregateError';
|
|
12
|
-
Error.captureStackTrace(this, AggregateErrorClass);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.AggregateError = AggregateErrorImpl = function (errors, message) {
|
|
16
|
-
return new AggregateErrorClass(errors, message);
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
exports.AggregateError = AggregateErrorImpl = AggregateError;
|
|
21
|
-
}
|
|
22
|
-
function isAggregateError(error) {
|
|
23
|
-
return 'errors' in error && Array.isArray(error['errors']);
|
|
24
|
-
}
|
|
25
|
-
exports.isAggregateError = isAggregateError;
|
package/esm/AggregateError.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
let AggregateErrorImpl;
|
|
2
|
-
if (typeof AggregateError === 'undefined') {
|
|
3
|
-
class AggregateErrorClass extends Error {
|
|
4
|
-
constructor(errors, message = '') {
|
|
5
|
-
super(message);
|
|
6
|
-
this.errors = errors;
|
|
7
|
-
this.name = 'AggregateError';
|
|
8
|
-
Error.captureStackTrace(this, AggregateErrorClass);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
AggregateErrorImpl = function (errors, message) {
|
|
12
|
-
return new AggregateErrorClass(errors, message);
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
AggregateErrorImpl = AggregateError;
|
|
17
|
-
}
|
|
18
|
-
export { AggregateErrorImpl as AggregateError };
|
|
19
|
-
export function isAggregateError(error) {
|
|
20
|
-
return 'errors' in error && Array.isArray(error['errors']);
|
|
21
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
interface AggregateError extends Error {
|
|
2
|
-
errors: any[];
|
|
3
|
-
}
|
|
4
|
-
interface AggregateErrorConstructor {
|
|
5
|
-
new (errors: Iterable<any>, message?: string): AggregateError;
|
|
6
|
-
(errors: Iterable<any>, message?: string): AggregateError;
|
|
7
|
-
readonly prototype: AggregateError;
|
|
8
|
-
}
|
|
9
|
-
declare let AggregateErrorImpl: AggregateErrorConstructor;
|
|
10
|
-
export { AggregateErrorImpl as AggregateError };
|
|
11
|
-
export declare function isAggregateError(error: Error): error is AggregateError;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
interface AggregateError extends Error {
|
|
2
|
-
errors: any[];
|
|
3
|
-
}
|
|
4
|
-
interface AggregateErrorConstructor {
|
|
5
|
-
new (errors: Iterable<any>, message?: string): AggregateError;
|
|
6
|
-
(errors: Iterable<any>, message?: string): AggregateError;
|
|
7
|
-
readonly prototype: AggregateError;
|
|
8
|
-
}
|
|
9
|
-
declare let AggregateErrorImpl: AggregateErrorConstructor;
|
|
10
|
-
export { AggregateErrorImpl as AggregateError };
|
|
11
|
-
export declare function isAggregateError(error: Error): error is AggregateError;
|