Closed tasiotas closed 1 year ago
Nuxi 3.0.0 Nuxt 3.0.0 with Nitro 1.0.0
"nuxt-graphql-client": "0.2.17"
When specifying serverOnly headers in default client config, I am getting error below:
nuxt | [nuxt] [request error] [unhandled] [500] Cannot delete property 'serverOnly' of #<Object>
nuxt.config.ts
'graphql-client': { clients: { default: { host: process.env.GQL_HOST || 'http://django:8000/api', clientHost: 'https://' + process.env.DOMAIN + '/api', headers: { 'X-CUSTOM-HEADER': 'dsdas', serverOnly: { 'X-SERVER-ONLY': 'vcvxcvx', }, }, }, }, },
define headers for server only
No response
nuxt | [nuxt] [request error] [unhandled] [500] Cannot delete property 'serverOnly' of #<Object> nuxt | at ./node_modules/nuxt-graphql-client/dist/runtime/plugin.mjs:20:18 nuxt | at fn (./node_modules/nuxt/dist/app/nuxt.mjs:151:27) nuxt | at Object.callAsync (./node_modules/unctx/dist/index.mjs:49:19) nuxt | at callWithNuxt (./node_modules/nuxt/dist/app/nuxt.mjs:153:23) nuxt | at applyPlugin (./node_modules/nuxt/dist/app/nuxt.mjs:97:29) nuxt | at Module.applyPlugins (./node_modules/nuxt/dist/app/nuxt.mjs:107:11) nuxt | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) nuxt | at async createNuxtAppServer (./node_modules/nuxt/dist/app/entry.mjs:29:7) nuxt | at async default (./node_modules/@nuxt/vite-builder/dist/runtime/vite-node.mjs:27:18) nuxt | at async Object.renderToString (./node_modules/vue-bundle-renderer/dist/runtime.mjs:172:19)
thank you
Environment
Nuxi 3.0.0 Nuxt 3.0.0 with Nitro 1.0.0
"nuxt-graphql-client": "0.2.17"
Describe the bug
When specifying serverOnly headers in default client config, I am getting error below:
nuxt.config.ts
Expected behaviour
define headers for server only
Reproduction
No response
Additional context
No response
Logs