"graphql-client": {
clients: {
craft: {
host: "will be overwritten by .env",
},
bagisto: {
host: "will be overwritten by .env",
},
},
},
When I try the following:
useGqlToken("jwt from backend", { client: "bagisto" });
It always sets the token on the first/default client (craft)
Switching bagisto to the first/default client does not fix this because the token set is used on both clients (craft and bagisto) even though it is only set for the bagisto client.
Expected behaviour
Token should get set on the bagisto client and only be used on this client.
UPDATE:
Manually setting the tokenStorage name on both clients fixed it. Still something wrong internally how/where the token gets set on the client.
clients: {
bagisto: {
host: "will be overwritten by .env",
tokenStorage: {
name: "gql:bagisto",
},
},
craft: {
host: "will be overwritten by .env",
tokenStorage: {
name: "gql:craft",
},
},
},
Environment
Describe the bug
I've got two clients setup in nuxt.config.
When I try the following:
It always sets the token on the first/default client (craft)
Switching bagisto to the first/default client does not fix this because the token set is used on both clients (craft and bagisto) even though it is only set for the bagisto client.
Expected behaviour
Token should get set on the bagisto client and only be used on this client.
UPDATE:
Manually setting the tokenStorage name on both clients fixed it. Still something wrong internally how/where the token gets set on the client.
Reproduction
No response
Additional context
No response
Logs
No response