nuxt-graphql-middleware 5.0.0-alpha.15 → 5.0.0-alpha.16
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/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/e1a39e19-d46f-47f9-88fd-317d5fa8bf87.json +1 -0
- package/dist/client/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +5 -2
- package/dist/runtime/server/api/mutation.js +2 -1
- package/dist/runtime/server/api/query.js +2 -1
- package/dist/runtime/server/utils/doGraphqlRequest.js +3 -2
- package/package.json +1 -1
- package/dist/client/_nuxt/builds/meta/e8397e32-8634-465d-8c5a-ae7d6f943789.json +0 -1
package/dist/client/200.html
CHANGED
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/u9er1db2.js">
|
|
8
8
|
<link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-500._g0akJim.css">
|
|
9
9
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/AZpplOcD.js">
|
|
10
|
-
<script type="module" src="/__nuxt-graphql-middleware/_nuxt/M311G39J.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},
|
|
11
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-graphql-middleware",buildId:"
|
|
10
|
+
<script type="module" src="/__nuxt-graphql-middleware/_nuxt/M311G39J.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1744204373787,false]</script>
|
|
11
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-graphql-middleware",buildId:"e1a39e19-d46f-47f9-88fd-317d5fa8bf87",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/client/404.html
CHANGED
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/u9er1db2.js">
|
|
8
8
|
<link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-500._g0akJim.css">
|
|
9
9
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/AZpplOcD.js">
|
|
10
|
-
<script type="module" src="/__nuxt-graphql-middleware/_nuxt/M311G39J.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},
|
|
11
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-graphql-middleware",buildId:"
|
|
10
|
+
<script type="module" src="/__nuxt-graphql-middleware/_nuxt/M311G39J.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1744204373788,false]</script>
|
|
11
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-graphql-middleware",buildId:"e1a39e19-d46f-47f9-88fd-317d5fa8bf87",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"e1a39e19-d46f-47f9-88fd-317d5fa8bf87","timestamp":1744204371551}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"e1a39e19-d46f-47f9-88fd-317d5fa8bf87","timestamp":1744204371551,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
package/dist/client/index.html
CHANGED
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/u9er1db2.js">
|
|
8
8
|
<link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-500._g0akJim.css">
|
|
9
9
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/AZpplOcD.js">
|
|
10
|
-
<script type="module" src="/__nuxt-graphql-middleware/_nuxt/M311G39J.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},
|
|
11
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-graphql-middleware",buildId:"
|
|
10
|
+
<script type="module" src="/__nuxt-graphql-middleware/_nuxt/M311G39J.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1744204373788,false]</script>
|
|
11
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-graphql-middleware",buildId:"e1a39e19-d46f-47f9-88fd-317d5fa8bf87",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import { existsSync as existsSync$1 } from 'fs';
|
|
|
19
19
|
import { onDevToolsInitialized, extendServerRpc } from '@nuxt/devtools-kit';
|
|
20
20
|
|
|
21
21
|
const name = "nuxt-graphql-middleware";
|
|
22
|
-
const version = "5.0.0-alpha.
|
|
22
|
+
const version = "5.0.0-alpha.16";
|
|
23
23
|
|
|
24
24
|
const logger = useLogger("nuxt-graphql-middleware");
|
|
25
25
|
const defaultOptions = {
|
|
@@ -119,6 +119,9 @@ class CollectedFile {
|
|
|
119
119
|
}
|
|
120
120
|
static async fromFilePath(filePath) {
|
|
121
121
|
const content = (await promises.readFile(filePath)).toString();
|
|
122
|
+
if (!content) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
122
125
|
return new CollectedFile(filePath, content, true);
|
|
123
126
|
}
|
|
124
127
|
/**
|
|
@@ -411,7 +414,7 @@ class Collector {
|
|
|
411
414
|
*/
|
|
412
415
|
async addFile(filePath) {
|
|
413
416
|
const file = await CollectedFile.fromFilePath(filePath);
|
|
414
|
-
if (!file
|
|
417
|
+
if (!file?.fileContents) {
|
|
415
418
|
return null;
|
|
416
419
|
}
|
|
417
420
|
this.files.set(filePath, file);
|
|
@@ -19,6 +19,7 @@ export async function doGraphqlRequest(body, context = null, providedEvent = nul
|
|
|
19
19
|
context: context || {}
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
|
+
const operation = body.operation || null;
|
|
22
23
|
const operationName = body.operationName || null;
|
|
23
24
|
const runtimeConfig = useRuntimeConfig().graphqlMiddleware;
|
|
24
25
|
const endpoint = await getEndpoint(
|
|
@@ -50,7 +51,7 @@ export async function doGraphqlRequest(body, context = null, providedEvent = nul
|
|
|
50
51
|
serverOptions,
|
|
51
52
|
event,
|
|
52
53
|
response,
|
|
53
|
-
|
|
54
|
+
operation,
|
|
54
55
|
operationName,
|
|
55
56
|
context
|
|
56
57
|
);
|
|
@@ -59,7 +60,7 @@ export async function doGraphqlRequest(body, context = null, providedEvent = nul
|
|
|
59
60
|
serverOptions,
|
|
60
61
|
event,
|
|
61
62
|
error,
|
|
62
|
-
|
|
63
|
+
operation,
|
|
63
64
|
operationName,
|
|
64
65
|
context
|
|
65
66
|
);
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"e8397e32-8634-465d-8c5a-ae7d6f943789","timestamp":1744006181773,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|