Skip to content

Commit

Permalink
fix: respect data path for relation results
Browse files Browse the repository at this point in the history
  • Loading branch information
dahaupt committed Mar 18, 2024
1 parent 70e1ef9 commit 594a8e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/nestedOperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ export function withNestedOperations<
// add id symbols to result so we can use them to update result relations
// with the results from nested middleware
addIdSymbolsToResult(result);

const dataPath = rootParams.__internalParams.dataPath;
const nestedNextResults = await Promise.all(
calls.map(async (call) => {
const relationsPath = buildTargetRelationPath(call.target);
const relationsPath = buildTargetRelationPath(call.target).filter(path => !dataPath.includes(path));

if (result === null || !relationsPath) {
call.queryPromise.resolve(undefined);
Expand Down

0 comments on commit 594a8e2

Please sign in to comment.