feat: Attach the Authorization header if a wpAuthToken is present in the context

This commit is contained in:
2026-03-26 15:32:13 -04:00
parent c9a9e03b60
commit 30c7b8b0b5
6 changed files with 124 additions and 26 deletions

View File

@@ -36,7 +36,13 @@ export default defineNuxtConfig({
},
server: {
context: ["server/graphql/context.ts"],
schema: [{ type: "remote", endpoint: `${process.env.NUXT_WP_URL}/graphql` }],
schema: [
{
type: "remote",
endpoint: `${process.env.NUXT_WP_URL}/graphql`,
hooks: ["server/graphql/wp-hooks.ts"],
},
],
},
},
@@ -48,7 +54,7 @@ export default defineNuxtConfig({
vite: {
optimizeDeps: {
include: ["@vue/devtools-core", "@vue/devtools-kit", "zod", "es-toolkit/promise"],
include: ["@vue/devtools-core", "@vue/devtools-kit", "es-toolkit/promise", "zod"],
},
},
});