Skip to content

Resolve categoryTree via catalog-dataplane instead of per-category calls - #612

Merged
renatoalmeidav merged 4 commits into
mainfrom
feature/category-tree-catalog-dataplane
Sep 23, 2026
Merged

renatoalmeidav merged 4 commits into
mainfrom
feature/category-tree-catalog-dataplane

Conversation

@renatoalmeidav

@renatoalmeidav renatoalmeidav commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

This change is directly related to the Multilanguage feature. We are updating the CategoryTree resolver to use the new catalog client (catalog-dataplane) to get the already translated data.

The catalog-dataplane indexes both translations (from multilanguage and messages api). Once the request comes, it delivers an already translated response.

This PR has two big parts.

  1. Add a new client to be consumed by the CategoryTree
  2. Remove wrapping used during the l10n phase on Messages component

Companion graphql: vtex-apps/search-graphql#175. Publish both apps together. (search-resolver should be executed first)

Summary

  • Replace that with a single call to the catalog-dataplane product endpoint (GET /api/catalog-dataplane/product/{id}), which already returns the product's full root-to-leaf category path in one response.
  • New CatalogDataplane client extends JanusClient (same base as Checkout/Intsch), hitting portal.vtexcommerce{stable,beta}.com.br with an={account} — no session/user auth header is sent, only the platform's own outbound-access Proxy-Authorization, keeping the request cache-friendly.
  • Stop wrapping Category name, titleTag, and metaTagDescription with formatTranslatableProp. Catalog-dataplane already returns these strings localized; Messages wrapping would re-translate them. This restores the behavior from [CATS-4817] Return Category fields from catalog without Messages wrapping #608 (yanked in 1.115.0 because the previous catalog route did not own translation).
  • On failure, logs via logDegradedSearchError and returns [] (no fallback to the old per-ID calls, to avoid mixing two data sources for the same field).

Test plan

An account with multilanguage active should have the translation of the categoryTree fixed, while the account that uses messages should be transparent.

Product.categoryTree walked the category tree one HTTP call per level
(search.category). Replace it with a single call to the catalog-dataplane
product endpoint via JanusClient (portal.vtexcommerce{stable,beta}.com.br),
which already returns the full root-to-leaf category path for the product.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@renatoalmeidav
renatoalmeidav requested a review from a team as a code owner September 15, 2026 17:59
@vtex-io-ci-cd

vtex-io-ci-cd Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot

vtex-io-docs-bot Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

renatoalmeidav and others added 2 commits September 16, 2026 10:43
The dataplane product category path already returns localized name, title, and meta, so wrapping them for @translatableV2 would re-translate those strings.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread node/index.ts
Comment thread manifest.json
hiagolcm
hiagolcm previously approved these changes Sep 16, 2026
@renatoalmeidav
renatoalmeidav merged commit 5cfbdb9 into main Sep 23, 2026
10 of 11 checks passed
@renatoalmeidav
renatoalmeidav deleted the feature/category-tree-catalog-dataplane branch September 23, 2026 15:05
@vtex-io-ci-cd

vtex-io-ci-cd Bot commented Sep 23, 2026

Copy link
Copy Markdown

Your PR has been merged! App is being published. 🚀
Version 1.116.0-beta.0 → 1.116.0

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy vtex.search-resolver@1.116.0

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants