@lewebsimple/nuxt-graphql 0.3.1 → 0.3.2
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 +6 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -310,7 +310,9 @@ const module$1 = defineNuxtModule({
|
|
|
310
310
|
name: "@lewebsimple/nuxt-graphql",
|
|
311
311
|
configKey: "graphql"
|
|
312
312
|
},
|
|
313
|
-
defaults: {
|
|
313
|
+
defaults: {
|
|
314
|
+
schemas: {}
|
|
315
|
+
},
|
|
314
316
|
async setup(options, nuxt) {
|
|
315
317
|
const { resolve } = createResolver(import.meta.url);
|
|
316
318
|
const { buildDir, rootDir } = nuxt.options;
|
|
@@ -326,6 +328,9 @@ const module$1 = defineNuxtModule({
|
|
|
326
328
|
}
|
|
327
329
|
serverProxies["context"] = getGraphQLContextProxy(contextPath);
|
|
328
330
|
serverProxies["remote-executor"] = getGenericServerProxy(resolve("./runtime/server/lib/remote-executor.ts"));
|
|
331
|
+
if (Object.keys(options.schemas || {}).length === 0) {
|
|
332
|
+
throw new Error("At least one GraphQL schema must be defined in the module options.");
|
|
333
|
+
}
|
|
329
334
|
for (const [schemaName, schemaDef] of Object.entries(options.schemas)) {
|
|
330
335
|
switch (schemaDef.type) {
|
|
331
336
|
case "local": {
|