Hi!
Im currently trying to figure out how to properly query translations.
The main scenario is to verify if a piece of content, like specification, brand or category, has been translated properly.
When inspecting the app “catalog translation” in the admin, I see there is a persistent query. As headers, -x-vtex-locale gets sent.
When trying to replicate in Postman, i constantly run into errors saying “Cannot read properties of undefined (reading ‘locale’)”.
I tried sending the header, I tried sending the locale as a URL-parameter. I tried adding it into the query.
When inspecting the code of the catalog translation app, there is not even a locale parameter inside the query. So it must somehow work around the header.
How can i properly structure my call to make this work?
this is my currently broken Approach as CURL, token removed for privacy.
curl --location 'https://app.io.vtex.com/vtex.catalog-graphql/v1/tiendadebijoy/master/_v/graphql?locale=es-AR' \
--header 'VtexIdclientAutCookie: PRIVATE' \
--header 'x-vtex-tenant: es-AR' \
--header 'x-vtex-locale: es-AR' \
--header 'Content-Type: application/json' \
--header 'Cookie: janus_sid=fff4aab3-3ebe-4bbc-8be1-5bb348fc1058' \
--data '{"query":"query getCategory($id: ID!) {\n category(id: $id) {\n id\n name\n title\n description\n linkId\n }\n \n}","variables":{"id":1}}'
Cheers!
Kai