@graphql-mesh/runtime 0.94.2 → 0.95.0-alpha-20230705144524-fe8e3ee1b
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/get-mesh.js +3 -1
- package/esm/get-mesh.js +3 -1
- package/package.json +1 -1
package/cjs/get-mesh.js
CHANGED
|
@@ -90,17 +90,19 @@ async function getMesh(options) {
|
|
|
90
90
|
let failed = false;
|
|
91
91
|
const initialPluginList = [
|
|
92
92
|
// TODO: Not a good practise to expect users to be a Yoga user
|
|
93
|
-
(0, core_1.useExtendContext)(({ request, req }) => {
|
|
93
|
+
(0, core_1.useExtendContext)(({ request, req, connectionParams, }) => {
|
|
94
94
|
// Maybe Node-like environment
|
|
95
95
|
if (req?.headers) {
|
|
96
96
|
return {
|
|
97
97
|
headers: (0, utils_1.getHeadersObj)(req.headers),
|
|
98
|
+
connectionParams,
|
|
98
99
|
};
|
|
99
100
|
}
|
|
100
101
|
// Fetch environment
|
|
101
102
|
if (request?.headers) {
|
|
102
103
|
return {
|
|
103
104
|
headers: (0, utils_1.getHeadersObj)(request.headers),
|
|
105
|
+
connectionParams,
|
|
104
106
|
};
|
|
105
107
|
}
|
|
106
108
|
return {};
|
package/esm/get-mesh.js
CHANGED
|
@@ -86,17 +86,19 @@ export async function getMesh(options) {
|
|
|
86
86
|
let failed = false;
|
|
87
87
|
const initialPluginList = [
|
|
88
88
|
// TODO: Not a good practise to expect users to be a Yoga user
|
|
89
|
-
useExtendContext(({ request, req }) => {
|
|
89
|
+
useExtendContext(({ request, req, connectionParams, }) => {
|
|
90
90
|
// Maybe Node-like environment
|
|
91
91
|
if (req?.headers) {
|
|
92
92
|
return {
|
|
93
93
|
headers: getHeadersObj(req.headers),
|
|
94
|
+
connectionParams,
|
|
94
95
|
};
|
|
95
96
|
}
|
|
96
97
|
// Fetch environment
|
|
97
98
|
if (request?.headers) {
|
|
98
99
|
return {
|
|
99
100
|
headers: getHeadersObj(request.headers),
|
|
101
|
+
connectionParams,
|
|
100
102
|
};
|
|
101
103
|
}
|
|
102
104
|
return {};
|