From 5725837ba8bb592cd6de962999430c8a5acf00ed Mon Sep 17 00:00:00 2001 From: "Carlos R. L. Rodrigues" <37986729+carlos-r-l-rodrigues@users.noreply.github.com> Date: Tue, 25 Nov 2025 12:35:05 +0200 Subject: [PATCH] fix(orchestration): fetch fields from link entities (#14097) * fix(orchestration): fetch fields from link entities * args --- .changeset/wacky-feet-follow.md | 5 +++++ packages/core/orchestration/src/joiner/remote-joiner.ts | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/wacky-feet-follow.md diff --git a/.changeset/wacky-feet-follow.md b/.changeset/wacky-feet-follow.md new file mode 100644 index 0000000000..832d69bd77 --- /dev/null +++ b/.changeset/wacky-feet-follow.md @@ -0,0 +1,5 @@ +--- +"@medusajs/orchestration": patch +--- + +fix(orchestration): fetch fields from link entity diff --git a/packages/core/orchestration/src/joiner/remote-joiner.ts b/packages/core/orchestration/src/joiner/remote-joiner.ts index 374d5f812c..5c2ec60be3 100644 --- a/packages/core/orchestration/src/joiner/remote-joiner.ts +++ b/packages/core/orchestration/src/joiner/remote-joiner.ts @@ -1384,6 +1384,8 @@ export class RemoteJoiner { const existingExpand = expands.find((exp) => exp.property === midProp) const extraExtends = { + fields: existingExpand?.fields, + args: existingExpand?.args, ...(midProp === fullAliasProp ? expand : {}), property: midProp, isAliasMapping: !existingExpand,