@graphql-mesh/runtime 0.96.7 → 0.96.8-alpha-20230928204924-7466dd5bb
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/useSubschema.js +18 -2
- package/esm/useSubschema.js +18 -2
- package/package.json +2 -2
package/cjs/useSubschema.js
CHANGED
|
@@ -96,9 +96,25 @@ function getExecuteFn(subschema) {
|
|
|
96
96
|
compiledQueryCache.set(request.document, compiledQuery);
|
|
97
97
|
}
|
|
98
98
|
if (operationAST.operation === 'subscription') {
|
|
99
|
-
|
|
99
|
+
const result$ = compiledQuery.subscribe(request.rootValue, request.context, request.variables);
|
|
100
|
+
if ((0, utils_2.isPromise)(result$)) {
|
|
101
|
+
return result$.then(result => {
|
|
102
|
+
result.stringify = compiledQuery.stringify;
|
|
103
|
+
return result;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
result$.stringify = compiledQuery.stringify;
|
|
107
|
+
return result$;
|
|
108
|
+
}
|
|
109
|
+
const result$ = compiledQuery.query(request.rootValue, request.context, request.variables);
|
|
110
|
+
if ((0, utils_2.isPromise)(result$)) {
|
|
111
|
+
return result$.then(result => {
|
|
112
|
+
result.stringify = compiledQuery.stringify;
|
|
113
|
+
return result;
|
|
114
|
+
});
|
|
100
115
|
}
|
|
101
|
-
|
|
116
|
+
result$.stringify = compiledQuery.stringify;
|
|
117
|
+
return result$;
|
|
102
118
|
};
|
|
103
119
|
}
|
|
104
120
|
}
|
package/esm/useSubschema.js
CHANGED
|
@@ -93,9 +93,25 @@ function getExecuteFn(subschema) {
|
|
|
93
93
|
compiledQueryCache.set(request.document, compiledQuery);
|
|
94
94
|
}
|
|
95
95
|
if (operationAST.operation === 'subscription') {
|
|
96
|
-
|
|
96
|
+
const result$ = compiledQuery.subscribe(request.rootValue, request.context, request.variables);
|
|
97
|
+
if (isPromise(result$)) {
|
|
98
|
+
return result$.then(result => {
|
|
99
|
+
result.stringify = compiledQuery.stringify;
|
|
100
|
+
return result;
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
result$.stringify = compiledQuery.stringify;
|
|
104
|
+
return result$;
|
|
105
|
+
}
|
|
106
|
+
const result$ = compiledQuery.query(request.rootValue, request.context, request.variables);
|
|
107
|
+
if (isPromise(result$)) {
|
|
108
|
+
return result$.then(result => {
|
|
109
|
+
result.stringify = compiledQuery.stringify;
|
|
110
|
+
return result;
|
|
111
|
+
});
|
|
97
112
|
}
|
|
98
|
-
|
|
113
|
+
result$.stringify = compiledQuery.stringify;
|
|
114
|
+
return result$;
|
|
99
115
|
};
|
|
100
116
|
}
|
|
101
117
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-mesh/runtime",
|
|
3
|
-
"version": "0.96.
|
|
3
|
+
"version": "0.96.8-alpha-20230928204924-7466dd5bb",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@graphql-mesh/cross-helpers": "^0.4.1",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@envelop/core": "^4.0.0",
|
|
15
15
|
"@envelop/extended-validation": "^3.0.0",
|
|
16
|
-
"@envelop/graphql-jit": "^6.0.
|
|
16
|
+
"@envelop/graphql-jit": "^6.0.5",
|
|
17
17
|
"@graphql-mesh/string-interpolation": "^0.5.2",
|
|
18
18
|
"@graphql-tools/batch-delegate": "^9.0.0",
|
|
19
19
|
"@graphql-tools/delegate": "^10.0.0",
|