@envelop/preload-assets 3.4.0-alpha-e9434aa.0 → 3.4.0-alpha-05dbec7.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/esm/index.js +3 -7
- package/package.json +2 -2
package/esm/index.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.usePreloadAssets = void 0;
|
|
4
|
-
const core_1 = require("@envelop/core");
|
|
5
|
-
const usePreloadAssets = (opts) => ({
|
|
1
|
+
import { handleStreamOrSingleExecutionResult } from '@envelop/core';
|
|
2
|
+
export const usePreloadAssets = (opts) => ({
|
|
6
3
|
onExecute: ({ extendContext, args }) => {
|
|
7
4
|
var _a, _b;
|
|
8
5
|
const assets = new Set();
|
|
@@ -15,7 +12,7 @@ const usePreloadAssets = (opts) => ({
|
|
|
15
12
|
if (!assets.size) {
|
|
16
13
|
return;
|
|
17
14
|
}
|
|
18
|
-
return
|
|
15
|
+
return handleStreamOrSingleExecutionResult(payload, ({ result, setResult }) => {
|
|
19
16
|
setResult({
|
|
20
17
|
...result,
|
|
21
18
|
extensions: {
|
|
@@ -30,4 +27,3 @@ const usePreloadAssets = (opts) => ({
|
|
|
30
27
|
return undefined;
|
|
31
28
|
},
|
|
32
29
|
});
|
|
33
|
-
exports.usePreloadAssets = usePreloadAssets;
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@envelop/preload-assets",
|
|
3
|
-
"version": "3.4.0-alpha-
|
|
3
|
+
"version": "3.4.0-alpha-05dbec7.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@envelop/core": "2.4.0-alpha-
|
|
6
|
+
"@envelop/core": "2.4.0-alpha-05dbec7.0",
|
|
7
7
|
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {},
|