Based on what is documented here.
The following config:
Results in the following output (.nuxt/graphql.options.mjs):
Expected Behavior
I expect to be able to configure middleware or a headers function.
Actual Behavior
The options aren't passed to the client if you use functions (a header object works fine).
Maybe it's not possible to use functions in nuxt.config.ts due to serialization or something. I tried to find something about it in the docs, but the only thing I could find was this.
Is there a different way to configure the middleware? Perhaps at a later stage?
Based on what is documented here.
The following config:
Results in the following output (
.nuxt/graphql.options.mjs):Expected Behavior
I expect to be able to configure middleware or a headers function.
Actual Behavior
The options aren't passed to the client if you use functions (a header object works fine).
Maybe it's not possible to use functions in
nuxt.config.tsdue to serialization or something. I tried to find something about it in the docs, but the only thing I could find was this.Is there a different way to configure the middleware? Perhaps at a later stage?