@lewebsimple/nuxt-graphql 0.7.6 → 0.7.7
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/module.json +1 -1
- package/dist/module.mjs +10 -2
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -16,7 +16,7 @@ import zodPreset from '@lewebsimple/graphql-codegen-zod';
|
|
|
16
16
|
import { createRequire } from 'node:module';
|
|
17
17
|
import { resolveCacheConfig } from '../dist/runtime/app/lib/cache-config.js';
|
|
18
18
|
|
|
19
|
-
const version = "0.7.
|
|
19
|
+
const version = "0.7.7";
|
|
20
20
|
|
|
21
21
|
const buildCache = /* @__PURE__ */ new Map();
|
|
22
22
|
function getCachedLoader(baseKey, loader) {
|
|
@@ -95,8 +95,16 @@ function getContextTemplate({ paths }) {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
const DOCUMENT_IGNORE_GLOBS = ["**/.nuxt/**", "**/.output/**", "**/dist/**", "**/node_modules/**"];
|
|
98
|
+
const DEFAULT_DOCUMENT_GLOBS = [
|
|
99
|
+
"app/**/*.{gql,ts,vue}",
|
|
100
|
+
"server/**/*.{gql,ts}",
|
|
101
|
+
"shared/**/*.{gql,ts}"
|
|
102
|
+
];
|
|
98
103
|
const GRAPHQL_FILE_EXTENSIONS = /* @__PURE__ */ new Set([".gql", ".graphql"]);
|
|
99
104
|
const CODE_FILE_EXTENSIONS = /* @__PURE__ */ new Set([".ts", ".mts", ".cts", ".js", ".mjs", ".cjs", ".vue"]);
|
|
105
|
+
function getDocumentGlobs(globs) {
|
|
106
|
+
return [...globs ?? DEFAULT_DOCUMENT_GLOBS];
|
|
107
|
+
}
|
|
100
108
|
async function resolveDocumentGlobs(globs, nuxt) {
|
|
101
109
|
const { resolvePath } = createResolver(nuxt.options.rootDir);
|
|
102
110
|
return Promise.all(
|
|
@@ -535,7 +543,7 @@ const module$1 = defineNuxtModule({
|
|
|
535
543
|
return schema;
|
|
536
544
|
});
|
|
537
545
|
const documentGlobs = await resolveDocumentGlobs(
|
|
538
|
-
options.client?.documents
|
|
546
|
+
getDocumentGlobs(options.client?.documents),
|
|
539
547
|
nuxt
|
|
540
548
|
);
|
|
541
549
|
const loadDocumentsCached = getCachedLoader(
|