-
Hello and thanks for your work! I'm doing a nuxt ecommerce with shopify and I need to change the shopify graphql token and url based on my locale, is it possible? I'm defining my endpoints in nuxt.config.ts thank you in advance :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey @lapenji, you should be able to leverage the |
Beta Was this translation helpful? Give feedback.
-
Thanks for your kind response, and your precious work of course :) I tried to do so but I need to do it in a middleware and it seems that even if the function runs without errors the host remains the same! this is my code in middleware/api.ts
if I log host the value is correct but if I look at the query results I find that it just queried the default endpoint. I'm quite a noob so there is probably something I'm getting wrong! thanks again for your help! |
Beta Was this translation helpful? Give feedback.
Hey @lapenji, you should be able to leverage the
useGqlHost
anduseGqlToken
composables, to implement your logic based on the locale