@graphitation/supermassive 3.3.0 → 3.4.0
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/.eslintcache +1 -1
- package/CHANGELOG.md +10 -2
- package/lib/collectFields.d.ts +8 -21
- package/lib/collectFields.d.ts.map +1 -1
- package/lib/collectFields.js +95 -97
- package/lib/collectFields.js.map +2 -2
- package/lib/collectFields.mjs +95 -97
- package/lib/collectFields.mjs.map +2 -2
- package/lib/executeWithoutSchema.d.ts +50 -6
- package/lib/executeWithoutSchema.d.ts.map +1 -1
- package/lib/executeWithoutSchema.js +517 -622
- package/lib/executeWithoutSchema.js.map +3 -3
- package/lib/executeWithoutSchema.mjs +518 -633
- package/lib/executeWithoutSchema.mjs.map +3 -3
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/types.d.ts +27 -63
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/lib/values.d.ts +4 -5
- package/lib/values.d.ts.map +1 -1
- package/lib/values.js +8 -13
- package/lib/values.js.map +2 -2
- package/lib/values.mjs +8 -13
- package/lib/values.mjs.map +2 -2
- package/package.json +1 -1
- package/lib/IncrementalPublisher.d.ts +0 -131
- package/lib/IncrementalPublisher.d.ts.map +0 -1
- package/lib/IncrementalPublisher.js +0 -519
- package/lib/IncrementalPublisher.js.map +0 -7
- package/lib/IncrementalPublisher.mjs +0 -503
- package/lib/IncrementalPublisher.mjs.map +0 -7
- package/lib/buildFieldPlan.d.ts +0 -18
- package/lib/buildFieldPlan.d.ts.map +0 -1
- package/lib/buildFieldPlan.js +0 -120
- package/lib/buildFieldPlan.js.map +0 -7
- package/lib/buildFieldPlan.mjs +0 -101
- package/lib/buildFieldPlan.mjs.map +0 -7
- package/lib/jsutils/getBySet.d.ts +0 -2
- package/lib/jsutils/getBySet.d.ts.map +0 -1
- package/lib/jsutils/getBySet.js +0 -32
- package/lib/jsutils/getBySet.js.map +0 -7
- package/lib/jsutils/getBySet.mjs +0 -13
- package/lib/jsutils/getBySet.mjs.map +0 -7
- package/lib/jsutils/isSameSet.d.ts +0 -2
- package/lib/jsutils/isSameSet.d.ts.map +0 -1
- package/lib/jsutils/isSameSet.js +0 -34
- package/lib/jsutils/isSameSet.js.map +0 -7
- package/lib/jsutils/isSameSet.mjs +0 -15
- package/lib/jsutils/isSameSet.mjs.map +0 -7
- package/lib/jsutils/promiseWithResolvers.d.ts +0 -11
- package/lib/jsutils/promiseWithResolvers.d.ts.map +0 -1
- package/lib/jsutils/promiseWithResolvers.js +0 -32
- package/lib/jsutils/promiseWithResolvers.js.map +0 -7
- package/lib/jsutils/promiseWithResolvers.mjs +0 -13
- package/lib/jsutils/promiseWithResolvers.mjs.map +0 -7
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import type { GraphQLError } from "graphql";
|
|
2
|
-
import type { ObjMap } from "./jsutils/ObjMap";
|
|
3
|
-
import type { Path } from "./jsutils/Path";
|
|
4
|
-
import type { GroupedFieldSet } from "./buildFieldPlan";
|
|
5
|
-
import { TotalExecutionResult, IncrementalExecutionResults } from "./types";
|
|
6
|
-
/**
|
|
7
|
-
* This class is used to publish incremental results to the client, enabling semi-concurrent
|
|
8
|
-
* execution while preserving result order.
|
|
9
|
-
*
|
|
10
|
-
* The internal publishing state is managed as follows:
|
|
11
|
-
*
|
|
12
|
-
* '_released': the set of Subsequent Result records that are ready to be sent to the client,
|
|
13
|
-
* i.e. their parents have completed and they have also completed.
|
|
14
|
-
*
|
|
15
|
-
* `_pending`: the set of Subsequent Result records that are definitely pending, i.e. their
|
|
16
|
-
* parents have completed so that they can no longer be filtered. This includes all Subsequent
|
|
17
|
-
* Result records in `released`, as well as the records that have not yet completed.
|
|
18
|
-
*
|
|
19
|
-
* @internal
|
|
20
|
-
*/
|
|
21
|
-
export declare class IncrementalPublisher {
|
|
22
|
-
private _nextId;
|
|
23
|
-
private _released;
|
|
24
|
-
private _pending;
|
|
25
|
-
private _signalled;
|
|
26
|
-
private _resolve;
|
|
27
|
-
constructor();
|
|
28
|
-
reportNewDeferFragmentRecord(deferredFragmentRecord: DeferredFragmentRecord, parentIncrementalResultRecord: InitialResultRecord | DeferredFragmentRecord | StreamItemsRecord): void;
|
|
29
|
-
reportNewDeferredGroupedFieldSetRecord(deferredGroupedFieldSetRecord: DeferredGroupedFieldSetRecord): void;
|
|
30
|
-
reportNewStreamItemsRecord(streamItemsRecord: StreamItemsRecord, parentIncrementalDataRecord: IncrementalDataRecord): void;
|
|
31
|
-
completeDeferredGroupedFieldSet(deferredGroupedFieldSetRecord: DeferredGroupedFieldSetRecord, data: ObjMap<unknown>): void;
|
|
32
|
-
markErroredDeferredGroupedFieldSet(deferredGroupedFieldSetRecord: DeferredGroupedFieldSetRecord, error: GraphQLError): void;
|
|
33
|
-
completeDeferredFragmentRecord(deferredFragmentRecord: DeferredFragmentRecord): void;
|
|
34
|
-
completeStreamItemsRecord(streamItemsRecord: StreamItemsRecord, items: Array<unknown>): void;
|
|
35
|
-
markErroredStreamItemsRecord(streamItemsRecord: StreamItemsRecord, error: GraphQLError): void;
|
|
36
|
-
setIsFinalRecord(streamItemsRecord: StreamItemsRecord): void;
|
|
37
|
-
setIsCompletedAsyncIterator(streamItemsRecord: StreamItemsRecord): void;
|
|
38
|
-
addFieldError(incrementalDataRecord: IncrementalDataRecord, error: GraphQLError): void;
|
|
39
|
-
buildDataResponse(initialResultRecord: InitialResultRecord, data: ObjMap<unknown> | null): TotalExecutionResult | IncrementalExecutionResults;
|
|
40
|
-
buildErrorResponse(initialResultRecord: InitialResultRecord, error: GraphQLError): TotalExecutionResult;
|
|
41
|
-
filter(nullPath: Path | undefined, erroringIncrementalDataRecord: IncrementalDataRecord): void;
|
|
42
|
-
private _pendingSourcesToResults;
|
|
43
|
-
private _getNextId;
|
|
44
|
-
private _subscribe;
|
|
45
|
-
private _trigger;
|
|
46
|
-
private _reset;
|
|
47
|
-
private _introduce;
|
|
48
|
-
private _release;
|
|
49
|
-
private _push;
|
|
50
|
-
private _getIncrementalResult;
|
|
51
|
-
private _processPending;
|
|
52
|
-
private _getIncrementalDeferResult;
|
|
53
|
-
private _completedRecordToResult;
|
|
54
|
-
private _publish;
|
|
55
|
-
private _getChildren;
|
|
56
|
-
private _getDescendants;
|
|
57
|
-
private _nullsChildSubsequentResultRecord;
|
|
58
|
-
private _matchesPath;
|
|
59
|
-
}
|
|
60
|
-
/** @internal */
|
|
61
|
-
export declare class InitialResultRecord {
|
|
62
|
-
errors: Array<GraphQLError>;
|
|
63
|
-
children: Set<SubsequentResultRecord>;
|
|
64
|
-
constructor();
|
|
65
|
-
}
|
|
66
|
-
/** @internal */
|
|
67
|
-
export declare class DeferredGroupedFieldSetRecord {
|
|
68
|
-
path: ReadonlyArray<string | number>;
|
|
69
|
-
deferredFragmentRecords: ReadonlyArray<DeferredFragmentRecord>;
|
|
70
|
-
groupedFieldSet: GroupedFieldSet;
|
|
71
|
-
shouldInitiateDefer: boolean;
|
|
72
|
-
errors: Array<GraphQLError>;
|
|
73
|
-
data: ObjMap<unknown> | undefined;
|
|
74
|
-
sent: boolean;
|
|
75
|
-
constructor(opts: {
|
|
76
|
-
path: Path | undefined;
|
|
77
|
-
deferredFragmentRecords: ReadonlyArray<DeferredFragmentRecord>;
|
|
78
|
-
groupedFieldSet: GroupedFieldSet;
|
|
79
|
-
shouldInitiateDefer: boolean;
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
/** @internal */
|
|
83
|
-
export declare class DeferredFragmentRecord {
|
|
84
|
-
path: ReadonlyArray<string | number>;
|
|
85
|
-
label: string | undefined;
|
|
86
|
-
id: string | undefined;
|
|
87
|
-
children: Set<SubsequentResultRecord>;
|
|
88
|
-
deferredGroupedFieldSetRecords: Set<DeferredGroupedFieldSetRecord>;
|
|
89
|
-
errors: Array<GraphQLError>;
|
|
90
|
-
filtered: boolean;
|
|
91
|
-
pendingSent?: boolean;
|
|
92
|
-
_pending: Set<DeferredGroupedFieldSetRecord>;
|
|
93
|
-
constructor(opts: {
|
|
94
|
-
path: Path | undefined;
|
|
95
|
-
label: string | undefined;
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
/** @internal */
|
|
99
|
-
export declare class StreamRecord {
|
|
100
|
-
label: string | undefined;
|
|
101
|
-
path: ReadonlyArray<string | number>;
|
|
102
|
-
id: string | undefined;
|
|
103
|
-
errors: Array<GraphQLError>;
|
|
104
|
-
earlyReturn?: (() => Promise<unknown>) | undefined;
|
|
105
|
-
pendingSent?: boolean;
|
|
106
|
-
constructor(opts: {
|
|
107
|
-
label: string | undefined;
|
|
108
|
-
path: Path;
|
|
109
|
-
earlyReturn?: (() => Promise<unknown>) | undefined;
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
/** @internal */
|
|
113
|
-
export declare class StreamItemsRecord {
|
|
114
|
-
errors: Array<GraphQLError>;
|
|
115
|
-
streamRecord: StreamRecord;
|
|
116
|
-
path: ReadonlyArray<string | number>;
|
|
117
|
-
items: Array<unknown> | undefined;
|
|
118
|
-
children: Set<SubsequentResultRecord>;
|
|
119
|
-
isFinalRecord?: boolean;
|
|
120
|
-
isCompletedAsyncIterator?: boolean;
|
|
121
|
-
isCompleted: boolean;
|
|
122
|
-
filtered: boolean;
|
|
123
|
-
constructor(opts: {
|
|
124
|
-
streamRecord: StreamRecord;
|
|
125
|
-
path: Path | undefined;
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
export type IncrementalDataRecord = InitialResultRecord | DeferredGroupedFieldSetRecord | StreamItemsRecord;
|
|
129
|
-
type SubsequentResultRecord = DeferredFragmentRecord | StreamItemsRecord;
|
|
130
|
-
export {};
|
|
131
|
-
//# sourceMappingURL=IncrementalPublisher.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IncrementalPublisher.d.ts","sourceRoot":"","sources":["../src/IncrementalPublisher.ts"],"names":[],"mappings":"AAAA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B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;QAC1B,IAAI,EAAE,IAAI,CAAC;QACX,WAAW,CAAC,EAAE,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;KACpD;CAMF;AAED,gBAAgB;AAChB,qBAAa,iBAAiB;IAC5B,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACrC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC;IACtC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;gBAEN,IAAI,EAAE;QAAE,YAAY,EAAE,YAAY,CAAC;QAAC,IAAI,EAAE,IAAI,GAAG,SAAS,CAAA;KAAE;CAQzE;AAED,MAAM,MAAM,qBAAqB,GAC7B,mBAAmB,GACnB,6BAA6B,GAC7B,iBAAiB,CAAC;AAEtB,KAAK,sBAAsB,GAAG,sBAAsB,GAAG,iBAAiB,CAAC"}
|
|
@@ -1,519 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
-
var __spreadValues = (a, b) => {
|
|
12
|
-
for (var prop in b || (b = {}))
|
|
13
|
-
if (__hasOwnProp.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
if (__getOwnPropSymbols)
|
|
16
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
-
if (__propIsEnum.call(b, prop))
|
|
18
|
-
__defNormalProp(a, prop, b[prop]);
|
|
19
|
-
}
|
|
20
|
-
return a;
|
|
21
|
-
};
|
|
22
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
-
var __export = (target, all) => {
|
|
24
|
-
for (var name in all)
|
|
25
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
|
-
};
|
|
27
|
-
var __copyProps = (to, from, except, desc) => {
|
|
28
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
-
for (let key of __getOwnPropNames(from))
|
|
30
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
32
|
-
}
|
|
33
|
-
return to;
|
|
34
|
-
};
|
|
35
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
|
-
var __async = (__this, __arguments, generator) => {
|
|
37
|
-
return new Promise((resolve, reject) => {
|
|
38
|
-
var fulfilled = (value) => {
|
|
39
|
-
try {
|
|
40
|
-
step(generator.next(value));
|
|
41
|
-
} catch (e) {
|
|
42
|
-
reject(e);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
var rejected = (value) => {
|
|
46
|
-
try {
|
|
47
|
-
step(generator.throw(value));
|
|
48
|
-
} catch (e) {
|
|
49
|
-
reject(e);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
53
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
var IncrementalPublisher_exports = {};
|
|
57
|
-
__export(IncrementalPublisher_exports, {
|
|
58
|
-
DeferredFragmentRecord: () => DeferredFragmentRecord,
|
|
59
|
-
DeferredGroupedFieldSetRecord: () => DeferredGroupedFieldSetRecord,
|
|
60
|
-
IncrementalPublisher: () => IncrementalPublisher,
|
|
61
|
-
InitialResultRecord: () => InitialResultRecord,
|
|
62
|
-
StreamItemsRecord: () => StreamItemsRecord,
|
|
63
|
-
StreamRecord: () => StreamRecord
|
|
64
|
-
});
|
|
65
|
-
module.exports = __toCommonJS(IncrementalPublisher_exports);
|
|
66
|
-
var import_Path = require("./jsutils/Path");
|
|
67
|
-
var import_promiseWithResolvers = require("./jsutils/promiseWithResolvers");
|
|
68
|
-
class IncrementalPublisher {
|
|
69
|
-
constructor() {
|
|
70
|
-
this._nextId = 0;
|
|
71
|
-
this._released = /* @__PURE__ */ new Set();
|
|
72
|
-
this._pending = /* @__PURE__ */ new Set();
|
|
73
|
-
this._reset();
|
|
74
|
-
}
|
|
75
|
-
reportNewDeferFragmentRecord(deferredFragmentRecord, parentIncrementalResultRecord) {
|
|
76
|
-
parentIncrementalResultRecord.children.add(deferredFragmentRecord);
|
|
77
|
-
}
|
|
78
|
-
reportNewDeferredGroupedFieldSetRecord(deferredGroupedFieldSetRecord) {
|
|
79
|
-
for (const deferredFragmentRecord of deferredGroupedFieldSetRecord.deferredFragmentRecords) {
|
|
80
|
-
deferredFragmentRecord._pending.add(deferredGroupedFieldSetRecord);
|
|
81
|
-
deferredFragmentRecord.deferredGroupedFieldSetRecords.add(
|
|
82
|
-
deferredGroupedFieldSetRecord
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
reportNewStreamItemsRecord(streamItemsRecord, parentIncrementalDataRecord) {
|
|
87
|
-
if (isDeferredGroupedFieldSetRecord(parentIncrementalDataRecord)) {
|
|
88
|
-
for (const parent of parentIncrementalDataRecord.deferredFragmentRecords) {
|
|
89
|
-
parent.children.add(streamItemsRecord);
|
|
90
|
-
}
|
|
91
|
-
} else {
|
|
92
|
-
parentIncrementalDataRecord.children.add(streamItemsRecord);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
completeDeferredGroupedFieldSet(deferredGroupedFieldSetRecord, data) {
|
|
96
|
-
deferredGroupedFieldSetRecord.data = data;
|
|
97
|
-
for (const deferredFragmentRecord of deferredGroupedFieldSetRecord.deferredFragmentRecords) {
|
|
98
|
-
deferredFragmentRecord._pending.delete(deferredGroupedFieldSetRecord);
|
|
99
|
-
if (deferredFragmentRecord._pending.size === 0) {
|
|
100
|
-
this.completeDeferredFragmentRecord(deferredFragmentRecord);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
markErroredDeferredGroupedFieldSet(deferredGroupedFieldSetRecord, error) {
|
|
105
|
-
for (const deferredFragmentRecord of deferredGroupedFieldSetRecord.deferredFragmentRecords) {
|
|
106
|
-
deferredFragmentRecord.errors.push(error);
|
|
107
|
-
this.completeDeferredFragmentRecord(deferredFragmentRecord);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
completeDeferredFragmentRecord(deferredFragmentRecord) {
|
|
111
|
-
this._release(deferredFragmentRecord);
|
|
112
|
-
}
|
|
113
|
-
completeStreamItemsRecord(streamItemsRecord, items) {
|
|
114
|
-
streamItemsRecord.items = items;
|
|
115
|
-
streamItemsRecord.isCompleted = true;
|
|
116
|
-
this._release(streamItemsRecord);
|
|
117
|
-
}
|
|
118
|
-
markErroredStreamItemsRecord(streamItemsRecord, error) {
|
|
119
|
-
var _a, _b;
|
|
120
|
-
streamItemsRecord.streamRecord.errors.push(error);
|
|
121
|
-
this.setIsFinalRecord(streamItemsRecord);
|
|
122
|
-
streamItemsRecord.isCompleted = true;
|
|
123
|
-
(_b = (_a = streamItemsRecord.streamRecord).earlyReturn) == null ? void 0 : _b.call(_a).catch(() => {
|
|
124
|
-
});
|
|
125
|
-
this._release(streamItemsRecord);
|
|
126
|
-
}
|
|
127
|
-
setIsFinalRecord(streamItemsRecord) {
|
|
128
|
-
streamItemsRecord.isFinalRecord = true;
|
|
129
|
-
}
|
|
130
|
-
setIsCompletedAsyncIterator(streamItemsRecord) {
|
|
131
|
-
streamItemsRecord.isCompletedAsyncIterator = true;
|
|
132
|
-
this.setIsFinalRecord(streamItemsRecord);
|
|
133
|
-
}
|
|
134
|
-
addFieldError(incrementalDataRecord, error) {
|
|
135
|
-
incrementalDataRecord.errors.push(error);
|
|
136
|
-
}
|
|
137
|
-
buildDataResponse(initialResultRecord, data) {
|
|
138
|
-
for (const child of initialResultRecord.children) {
|
|
139
|
-
if (child.filtered) {
|
|
140
|
-
continue;
|
|
141
|
-
}
|
|
142
|
-
this._publish(child);
|
|
143
|
-
}
|
|
144
|
-
const errors = initialResultRecord.errors;
|
|
145
|
-
const initialResult = errors.length === 0 ? { data } : { errors, data };
|
|
146
|
-
const pending = this._pending;
|
|
147
|
-
if (pending.size > 0) {
|
|
148
|
-
const pendingSources = /* @__PURE__ */ new Set();
|
|
149
|
-
for (const subsequentResultRecord of pending) {
|
|
150
|
-
const pendingSource = isStreamItemsRecord(subsequentResultRecord) ? subsequentResultRecord.streamRecord : subsequentResultRecord;
|
|
151
|
-
pendingSources.add(pendingSource);
|
|
152
|
-
}
|
|
153
|
-
return {
|
|
154
|
-
initialResult: __spreadProps(__spreadValues({}, initialResult), {
|
|
155
|
-
pending: this._pendingSourcesToResults(pendingSources),
|
|
156
|
-
hasNext: true
|
|
157
|
-
}),
|
|
158
|
-
subsequentResults: this._subscribe()
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
return initialResult;
|
|
162
|
-
}
|
|
163
|
-
buildErrorResponse(initialResultRecord, error) {
|
|
164
|
-
const errors = initialResultRecord.errors;
|
|
165
|
-
errors.push(error);
|
|
166
|
-
return { data: null, errors };
|
|
167
|
-
}
|
|
168
|
-
filter(nullPath, erroringIncrementalDataRecord) {
|
|
169
|
-
const nullPathArray = (0, import_Path.pathToArray)(nullPath);
|
|
170
|
-
const streams = /* @__PURE__ */ new Set();
|
|
171
|
-
const children = this._getChildren(erroringIncrementalDataRecord);
|
|
172
|
-
const descendants = this._getDescendants(children);
|
|
173
|
-
for (const child of descendants) {
|
|
174
|
-
if (!this._nullsChildSubsequentResultRecord(child, nullPathArray)) {
|
|
175
|
-
continue;
|
|
176
|
-
}
|
|
177
|
-
child.filtered = true;
|
|
178
|
-
if (isStreamItemsRecord(child)) {
|
|
179
|
-
streams.add(child.streamRecord);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
streams.forEach((stream) => {
|
|
183
|
-
var _a;
|
|
184
|
-
(_a = stream.earlyReturn) == null ? void 0 : _a.call(stream).catch(() => {
|
|
185
|
-
});
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
_pendingSourcesToResults(pendingSources) {
|
|
189
|
-
const pendingResults = [];
|
|
190
|
-
for (const pendingSource of pendingSources) {
|
|
191
|
-
pendingSource.pendingSent = true;
|
|
192
|
-
const id = this._getNextId();
|
|
193
|
-
pendingSource.id = id;
|
|
194
|
-
const pendingResult = {
|
|
195
|
-
id,
|
|
196
|
-
path: pendingSource.path
|
|
197
|
-
};
|
|
198
|
-
if (pendingSource.label !== void 0) {
|
|
199
|
-
pendingResult.label = pendingSource.label;
|
|
200
|
-
}
|
|
201
|
-
pendingResults.push(pendingResult);
|
|
202
|
-
}
|
|
203
|
-
return pendingResults;
|
|
204
|
-
}
|
|
205
|
-
_getNextId() {
|
|
206
|
-
return String(this._nextId++);
|
|
207
|
-
}
|
|
208
|
-
_subscribe() {
|
|
209
|
-
let isDone = false;
|
|
210
|
-
const _next = () => __async(this, null, function* () {
|
|
211
|
-
while (true) {
|
|
212
|
-
if (isDone) {
|
|
213
|
-
return { value: void 0, done: true };
|
|
214
|
-
}
|
|
215
|
-
for (const item of this._released) {
|
|
216
|
-
this._pending.delete(item);
|
|
217
|
-
}
|
|
218
|
-
const released = this._released;
|
|
219
|
-
this._released = /* @__PURE__ */ new Set();
|
|
220
|
-
const result = this._getIncrementalResult(released);
|
|
221
|
-
if (this._pending.size === 0) {
|
|
222
|
-
isDone = true;
|
|
223
|
-
}
|
|
224
|
-
if (result !== void 0) {
|
|
225
|
-
return { value: result, done: false };
|
|
226
|
-
}
|
|
227
|
-
yield this._signalled;
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
const returnStreamIterators = () => __async(this, null, function* () {
|
|
231
|
-
const streams = /* @__PURE__ */ new Set();
|
|
232
|
-
const descendants = this._getDescendants(this._pending);
|
|
233
|
-
for (const subsequentResultRecord of descendants) {
|
|
234
|
-
if (isStreamItemsRecord(subsequentResultRecord)) {
|
|
235
|
-
streams.add(subsequentResultRecord.streamRecord);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
const promises = [];
|
|
239
|
-
streams.forEach((streamRecord) => {
|
|
240
|
-
if (streamRecord.earlyReturn) {
|
|
241
|
-
promises.push(streamRecord.earlyReturn());
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
yield Promise.all(promises);
|
|
245
|
-
});
|
|
246
|
-
const _return = () => __async(this, null, function* () {
|
|
247
|
-
isDone = true;
|
|
248
|
-
yield returnStreamIterators();
|
|
249
|
-
return { value: void 0, done: true };
|
|
250
|
-
});
|
|
251
|
-
const _throw = (error) => __async(this, null, function* () {
|
|
252
|
-
isDone = true;
|
|
253
|
-
yield returnStreamIterators();
|
|
254
|
-
return Promise.reject(error);
|
|
255
|
-
});
|
|
256
|
-
return {
|
|
257
|
-
[Symbol.asyncIterator]() {
|
|
258
|
-
return this;
|
|
259
|
-
},
|
|
260
|
-
next: _next,
|
|
261
|
-
return: _return,
|
|
262
|
-
throw: _throw
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
_trigger() {
|
|
266
|
-
this._resolve();
|
|
267
|
-
this._reset();
|
|
268
|
-
}
|
|
269
|
-
_reset() {
|
|
270
|
-
const { promise: signalled, resolve } = (0, import_promiseWithResolvers.promiseWithResolvers)();
|
|
271
|
-
this._resolve = resolve;
|
|
272
|
-
this._signalled = signalled;
|
|
273
|
-
}
|
|
274
|
-
_introduce(item) {
|
|
275
|
-
this._pending.add(item);
|
|
276
|
-
}
|
|
277
|
-
_release(item) {
|
|
278
|
-
if (this._pending.has(item)) {
|
|
279
|
-
this._released.add(item);
|
|
280
|
-
this._trigger();
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
_push(item) {
|
|
284
|
-
this._released.add(item);
|
|
285
|
-
this._pending.add(item);
|
|
286
|
-
this._trigger();
|
|
287
|
-
}
|
|
288
|
-
_getIncrementalResult(completedRecords) {
|
|
289
|
-
const { pending, incremental, completed } = this._processPending(completedRecords);
|
|
290
|
-
const hasNext = this._pending.size > 0;
|
|
291
|
-
if (incremental.length === 0 && completed.length === 0 && hasNext) {
|
|
292
|
-
return void 0;
|
|
293
|
-
}
|
|
294
|
-
const result = { hasNext };
|
|
295
|
-
if (pending.length) {
|
|
296
|
-
result.pending = pending;
|
|
297
|
-
}
|
|
298
|
-
if (incremental.length) {
|
|
299
|
-
result.incremental = incremental;
|
|
300
|
-
}
|
|
301
|
-
if (completed.length) {
|
|
302
|
-
result.completed = completed;
|
|
303
|
-
}
|
|
304
|
-
return result;
|
|
305
|
-
}
|
|
306
|
-
_processPending(completedRecords) {
|
|
307
|
-
const newPendingSources = /* @__PURE__ */ new Set();
|
|
308
|
-
const incrementalResults = [];
|
|
309
|
-
const completedResults = [];
|
|
310
|
-
for (const subsequentResultRecord of completedRecords) {
|
|
311
|
-
for (const child of subsequentResultRecord.children) {
|
|
312
|
-
if (child.filtered) {
|
|
313
|
-
continue;
|
|
314
|
-
}
|
|
315
|
-
const pendingSource = isStreamItemsRecord(child) ? child.streamRecord : child;
|
|
316
|
-
if (!pendingSource.pendingSent) {
|
|
317
|
-
newPendingSources.add(pendingSource);
|
|
318
|
-
}
|
|
319
|
-
this._publish(child);
|
|
320
|
-
}
|
|
321
|
-
if (isStreamItemsRecord(subsequentResultRecord)) {
|
|
322
|
-
if (subsequentResultRecord.isFinalRecord) {
|
|
323
|
-
newPendingSources.delete(subsequentResultRecord.streamRecord);
|
|
324
|
-
completedResults.push(
|
|
325
|
-
this._completedRecordToResult(subsequentResultRecord.streamRecord)
|
|
326
|
-
);
|
|
327
|
-
}
|
|
328
|
-
if (subsequentResultRecord.isCompletedAsyncIterator) {
|
|
329
|
-
continue;
|
|
330
|
-
}
|
|
331
|
-
if (subsequentResultRecord.streamRecord.errors.length > 0) {
|
|
332
|
-
continue;
|
|
333
|
-
}
|
|
334
|
-
const incrementalResult = {
|
|
335
|
-
// safe because `items` is always defined when the record is completed
|
|
336
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
337
|
-
items: subsequentResultRecord.items,
|
|
338
|
-
// safe because `id` is defined once the stream has been released as pending
|
|
339
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
340
|
-
id: subsequentResultRecord.streamRecord.id
|
|
341
|
-
};
|
|
342
|
-
if (subsequentResultRecord.errors.length > 0) {
|
|
343
|
-
incrementalResult.errors = subsequentResultRecord.errors;
|
|
344
|
-
}
|
|
345
|
-
incrementalResults.push(incrementalResult);
|
|
346
|
-
} else {
|
|
347
|
-
newPendingSources.delete(subsequentResultRecord);
|
|
348
|
-
completedResults.push(
|
|
349
|
-
this._completedRecordToResult(subsequentResultRecord)
|
|
350
|
-
);
|
|
351
|
-
if (subsequentResultRecord.errors.length > 0) {
|
|
352
|
-
continue;
|
|
353
|
-
}
|
|
354
|
-
for (const deferredGroupedFieldSetRecord of subsequentResultRecord.deferredGroupedFieldSetRecords) {
|
|
355
|
-
if (!deferredGroupedFieldSetRecord.sent) {
|
|
356
|
-
deferredGroupedFieldSetRecord.sent = true;
|
|
357
|
-
const incrementalResult = this._getIncrementalDeferResult(deferredGroupedFieldSetRecord);
|
|
358
|
-
if (deferredGroupedFieldSetRecord.errors.length > 0) {
|
|
359
|
-
incrementalResult.errors = deferredGroupedFieldSetRecord.errors;
|
|
360
|
-
}
|
|
361
|
-
incrementalResults.push(incrementalResult);
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
return {
|
|
367
|
-
pending: this._pendingSourcesToResults(newPendingSources),
|
|
368
|
-
incremental: incrementalResults,
|
|
369
|
-
completed: completedResults
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
_getIncrementalDeferResult(deferredGroupedFieldSetRecord) {
|
|
373
|
-
const { data, deferredFragmentRecords } = deferredGroupedFieldSetRecord;
|
|
374
|
-
let maxLength;
|
|
375
|
-
let idWithLongestPath;
|
|
376
|
-
for (const deferredFragmentRecord of deferredFragmentRecords) {
|
|
377
|
-
const id = deferredFragmentRecord.id;
|
|
378
|
-
if (id === void 0) {
|
|
379
|
-
continue;
|
|
380
|
-
}
|
|
381
|
-
const length = deferredFragmentRecord.path.length;
|
|
382
|
-
if (maxLength === void 0 || length > maxLength) {
|
|
383
|
-
maxLength = length;
|
|
384
|
-
idWithLongestPath = id;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
const subPath = deferredGroupedFieldSetRecord.path.slice(maxLength);
|
|
388
|
-
const incrementalDeferResult = {
|
|
389
|
-
// safe because `data``is always defined when the record is completed
|
|
390
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
391
|
-
data,
|
|
392
|
-
// safe because `id` is always defined once the fragment has been released
|
|
393
|
-
// as pending and at least one fragment has been completed, so must have been
|
|
394
|
-
// released as pending
|
|
395
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
396
|
-
id: idWithLongestPath
|
|
397
|
-
};
|
|
398
|
-
if (subPath.length > 0) {
|
|
399
|
-
incrementalDeferResult.subPath = subPath;
|
|
400
|
-
}
|
|
401
|
-
return incrementalDeferResult;
|
|
402
|
-
}
|
|
403
|
-
_completedRecordToResult(completedRecord) {
|
|
404
|
-
const result = {
|
|
405
|
-
// safe because `id` is defined once the stream has been released as pending
|
|
406
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
407
|
-
id: completedRecord.id
|
|
408
|
-
};
|
|
409
|
-
if (completedRecord.errors.length > 0) {
|
|
410
|
-
result.errors = completedRecord.errors;
|
|
411
|
-
}
|
|
412
|
-
return result;
|
|
413
|
-
}
|
|
414
|
-
_publish(subsequentResultRecord) {
|
|
415
|
-
if (isStreamItemsRecord(subsequentResultRecord)) {
|
|
416
|
-
if (subsequentResultRecord.isCompleted) {
|
|
417
|
-
this._push(subsequentResultRecord);
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
this._introduce(subsequentResultRecord);
|
|
421
|
-
return;
|
|
422
|
-
}
|
|
423
|
-
if (subsequentResultRecord._pending.size > 0) {
|
|
424
|
-
this._introduce(subsequentResultRecord);
|
|
425
|
-
} else if (subsequentResultRecord.deferredGroupedFieldSetRecords.size > 0 || subsequentResultRecord.children.size > 0) {
|
|
426
|
-
this._push(subsequentResultRecord);
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
_getChildren(erroringIncrementalDataRecord) {
|
|
430
|
-
const children = /* @__PURE__ */ new Set();
|
|
431
|
-
if (isDeferredGroupedFieldSetRecord(erroringIncrementalDataRecord)) {
|
|
432
|
-
for (const erroringIncrementalResultRecord of erroringIncrementalDataRecord.deferredFragmentRecords) {
|
|
433
|
-
for (const child of erroringIncrementalResultRecord.children) {
|
|
434
|
-
children.add(child);
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
} else {
|
|
438
|
-
for (const child of erroringIncrementalDataRecord.children) {
|
|
439
|
-
children.add(child);
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
return children;
|
|
443
|
-
}
|
|
444
|
-
_getDescendants(children, descendants = /* @__PURE__ */ new Set()) {
|
|
445
|
-
for (const child of children) {
|
|
446
|
-
descendants.add(child);
|
|
447
|
-
this._getDescendants(child.children, descendants);
|
|
448
|
-
}
|
|
449
|
-
return descendants;
|
|
450
|
-
}
|
|
451
|
-
_nullsChildSubsequentResultRecord(subsequentResultRecord, nullPath) {
|
|
452
|
-
const incrementalDataRecords = isStreamItemsRecord(subsequentResultRecord) ? [subsequentResultRecord] : subsequentResultRecord.deferredGroupedFieldSetRecords;
|
|
453
|
-
for (const incrementalDataRecord of incrementalDataRecords) {
|
|
454
|
-
if (this._matchesPath(incrementalDataRecord.path, nullPath)) {
|
|
455
|
-
return true;
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
return false;
|
|
459
|
-
}
|
|
460
|
-
_matchesPath(testPath, basePath) {
|
|
461
|
-
for (let i = 0; i < basePath.length; i++) {
|
|
462
|
-
if (basePath[i] !== testPath[i]) {
|
|
463
|
-
return false;
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
return true;
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
function isDeferredGroupedFieldSetRecord(incrementalDataRecord) {
|
|
470
|
-
return incrementalDataRecord instanceof DeferredGroupedFieldSetRecord;
|
|
471
|
-
}
|
|
472
|
-
function isStreamItemsRecord(subsequentResultRecord) {
|
|
473
|
-
return subsequentResultRecord instanceof StreamItemsRecord;
|
|
474
|
-
}
|
|
475
|
-
class InitialResultRecord {
|
|
476
|
-
constructor() {
|
|
477
|
-
this.errors = [];
|
|
478
|
-
this.children = /* @__PURE__ */ new Set();
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
class DeferredGroupedFieldSetRecord {
|
|
482
|
-
constructor(opts) {
|
|
483
|
-
this.path = (0, import_Path.pathToArray)(opts.path);
|
|
484
|
-
this.deferredFragmentRecords = opts.deferredFragmentRecords;
|
|
485
|
-
this.groupedFieldSet = opts.groupedFieldSet;
|
|
486
|
-
this.shouldInitiateDefer = opts.shouldInitiateDefer;
|
|
487
|
-
this.errors = [];
|
|
488
|
-
this.sent = false;
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
class DeferredFragmentRecord {
|
|
492
|
-
constructor(opts) {
|
|
493
|
-
this.path = (0, import_Path.pathToArray)(opts.path);
|
|
494
|
-
this.label = opts.label;
|
|
495
|
-
this.children = /* @__PURE__ */ new Set();
|
|
496
|
-
this.filtered = false;
|
|
497
|
-
this.deferredGroupedFieldSetRecords = /* @__PURE__ */ new Set();
|
|
498
|
-
this.errors = [];
|
|
499
|
-
this._pending = /* @__PURE__ */ new Set();
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
class StreamRecord {
|
|
503
|
-
constructor(opts) {
|
|
504
|
-
this.label = opts.label;
|
|
505
|
-
this.path = (0, import_Path.pathToArray)(opts.path);
|
|
506
|
-
this.errors = [];
|
|
507
|
-
this.earlyReturn = opts.earlyReturn;
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
class StreamItemsRecord {
|
|
511
|
-
constructor(opts) {
|
|
512
|
-
this.streamRecord = opts.streamRecord;
|
|
513
|
-
this.path = (0, import_Path.pathToArray)(opts.path);
|
|
514
|
-
this.children = /* @__PURE__ */ new Set();
|
|
515
|
-
this.errors = [];
|
|
516
|
-
this.isCompleted = false;
|
|
517
|
-
this.filtered = false;
|
|
518
|
-
}
|
|
519
|
-
}
|