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,