@nestjs/apollo 10.1.6 → 10.2.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.
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { $$asyncIterator } from 'iterall';
|
|
2
|
-
declare type AsyncIterator<T> = {
|
|
2
|
+
export declare type AsyncIterator<T> = {
|
|
3
3
|
next(value?: any): Promise<IteratorResult<T>>;
|
|
4
4
|
return(): any;
|
|
5
5
|
throw(error: any): any;
|
|
6
6
|
[$$asyncIterator]: any;
|
|
7
7
|
};
|
|
8
8
|
export declare const createAsyncIterator: <T = any>(lazyFactory: Promise<AsyncIterator<T>>, filterFn: Function) => Promise<AsyncIterator<T>>;
|
|
9
|
-
export {};
|
|
10
9
|
//# sourceMappingURL=async-iterator.util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-iterator.util.d.ts","sourceRoot":"","sources":["../../lib/utils/async-iterator.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,
|
|
1
|
+
{"version":3,"file":"async-iterator.util.d.ts","sourceRoot":"","sources":["../../lib/utils/async-iterator.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,oBAAY,aAAa,CAAC,CAAC,IAAI;IAC7B,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9C,MAAM,IAAI,GAAG,CAAC;IACd,KAAK,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG,CAAC;IACvB,CAAC,eAAe,CAAC,EAAE,GAAG,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,mBAAmB,8DAEpB,QAAQ,8BA2DnB,CAAC"}
|
|
@@ -4,17 +4,35 @@ exports.createAsyncIterator = void 0;
|
|
|
4
4
|
const iterall_1 = require("iterall");
|
|
5
5
|
const createAsyncIterator = async (lazyFactory, filterFn) => {
|
|
6
6
|
const asyncIterator = await lazyFactory;
|
|
7
|
-
const getNextValue =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
const getNextValue = () => {
|
|
8
|
+
return new Promise((resolve, reject) => {
|
|
9
|
+
const inner = () => {
|
|
10
|
+
if (!asyncIterator || typeof asyncIterator.next !== 'function') {
|
|
11
|
+
reject(asyncIterator);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
asyncIterator
|
|
15
|
+
.next()
|
|
16
|
+
.then((payload) => {
|
|
17
|
+
if (payload.done === true) {
|
|
18
|
+
resolve(payload);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
Promise.resolve(filterFn(payload.value))
|
|
22
|
+
.catch(() => false)
|
|
23
|
+
.then((result) => {
|
|
24
|
+
if (result === true) {
|
|
25
|
+
resolve(payload);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
inner();
|
|
29
|
+
return;
|
|
30
|
+
});
|
|
31
|
+
})
|
|
32
|
+
.catch(reject);
|
|
33
|
+
};
|
|
34
|
+
inner();
|
|
35
|
+
});
|
|
18
36
|
};
|
|
19
37
|
return {
|
|
20
38
|
next() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/apollo",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.2.0",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@apollo)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"url": "https://github.com/nestjs/graphql/issues"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@apollo/gateway": "0.
|
|
27
|
-
"@apollo/gateway-v2": "npm:@apollo/gateway@2.1
|
|
28
|
-
"@apollo/subgraph-v2": "npm:@apollo/subgraph@2.1
|
|
26
|
+
"@apollo/gateway": "0.54.1",
|
|
27
|
+
"@apollo/gateway-v2": "npm:@apollo/gateway@2.3.1",
|
|
28
|
+
"@apollo/subgraph-v2": "npm:@apollo/subgraph@2.3.1",
|
|
29
29
|
"@nestjs/common": "8.4.7",
|
|
30
30
|
"@nestjs/core": "8.4.7",
|
|
31
31
|
"@nestjs/platform-express": "8.4.7",
|
|
@@ -43,10 +43,11 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"iterall": "1.3.0",
|
|
45
45
|
"lodash.omit": "4.5.0",
|
|
46
|
-
"tslib": "2.
|
|
46
|
+
"tslib": "2.5.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@apollo/gateway": "^0.44.1 || ^0.46.0 || ^0.48.0 || ^0.49.0 || ^0.50.0 || ^2.0.0",
|
|
50
|
+
"@apollo/subgraph": "^2.0.0",
|
|
50
51
|
"@nestjs/common": "^8.2.3 || ^9.0.0",
|
|
51
52
|
"@nestjs/core": "^8.2.3 || ^9.0.0",
|
|
52
53
|
"@nestjs/graphql": "^10.0.0",
|
|
@@ -59,6 +60,9 @@
|
|
|
59
60
|
"@apollo/gateway": {
|
|
60
61
|
"optional": true
|
|
61
62
|
},
|
|
63
|
+
"@apollo/subgraph": {
|
|
64
|
+
"optional": true
|
|
65
|
+
},
|
|
62
66
|
"apollo-server-core": {
|
|
63
67
|
"optional": true
|
|
64
68
|
},
|
|
@@ -69,5 +73,5 @@
|
|
|
69
73
|
"optional": true
|
|
70
74
|
}
|
|
71
75
|
},
|
|
72
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "2c50d9564ea313500f9dd3b828e303e08ac956b2"
|
|
73
77
|
}
|