@graphql-tools/executor 0.0.3 → 0.0.4
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.
|
@@ -20,13 +20,19 @@ function normalizedExecutor(args) {
|
|
|
20
20
|
stop.then(() => {
|
|
21
21
|
stopped = true;
|
|
22
22
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
let err;
|
|
24
|
+
try {
|
|
25
|
+
for await (const value of result) {
|
|
26
|
+
if (stopped) {
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
await push(value);
|
|
26
30
|
}
|
|
27
|
-
push(value);
|
|
28
31
|
}
|
|
29
|
-
|
|
32
|
+
catch (e) {
|
|
33
|
+
err = e;
|
|
34
|
+
}
|
|
35
|
+
stop(err);
|
|
30
36
|
});
|
|
31
37
|
}
|
|
32
38
|
return result;
|
|
@@ -41,14 +47,20 @@ function normalizedExecutor(args) {
|
|
|
41
47
|
stop.then(() => {
|
|
42
48
|
stopped = true;
|
|
43
49
|
});
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
let err;
|
|
51
|
+
try {
|
|
52
|
+
await push(result.initialResult);
|
|
53
|
+
for await (const value of result.subsequentResults) {
|
|
54
|
+
if (stopped) {
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
await push(value);
|
|
48
58
|
}
|
|
49
|
-
push(value);
|
|
50
59
|
}
|
|
51
|
-
|
|
60
|
+
catch (e) {
|
|
61
|
+
err = e;
|
|
62
|
+
}
|
|
63
|
+
stop(err);
|
|
52
64
|
});
|
|
53
65
|
}
|
|
54
66
|
return result;
|
|
@@ -17,13 +17,19 @@ export function normalizedExecutor(args) {
|
|
|
17
17
|
stop.then(() => {
|
|
18
18
|
stopped = true;
|
|
19
19
|
});
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
let err;
|
|
21
|
+
try {
|
|
22
|
+
for await (const value of result) {
|
|
23
|
+
if (stopped) {
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
await push(value);
|
|
23
27
|
}
|
|
24
|
-
push(value);
|
|
25
28
|
}
|
|
26
|
-
|
|
29
|
+
catch (e) {
|
|
30
|
+
err = e;
|
|
31
|
+
}
|
|
32
|
+
stop(err);
|
|
27
33
|
});
|
|
28
34
|
}
|
|
29
35
|
return result;
|
|
@@ -38,14 +44,20 @@ export function normalizedExecutor(args) {
|
|
|
38
44
|
stop.then(() => {
|
|
39
45
|
stopped = true;
|
|
40
46
|
});
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
let err;
|
|
48
|
+
try {
|
|
49
|
+
await push(result.initialResult);
|
|
50
|
+
for await (const value of result.subsequentResults) {
|
|
51
|
+
if (stopped) {
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
await push(value);
|
|
45
55
|
}
|
|
46
|
-
push(value);
|
|
47
56
|
}
|
|
48
|
-
|
|
57
|
+
catch (e) {
|
|
58
|
+
err = e;
|
|
59
|
+
}
|
|
60
|
+
stop(err);
|
|
49
61
|
});
|
|
50
62
|
}
|
|
51
63
|
return result;
|