Skip to content

Fix $graphLookup traversal through nested array fields - #271

Merged
bwaldvogel merged 3 commits into
mainfrom
fix/graph-lookup-nested-fields
Nov 16, 2026
Merged

bwaldvogel merged 3 commits into
mainfrom
fix/graph-lookup-nested-fields

Conversation

@bwaldvogel

Copy link
Copy Markdown
Owner

Evaluate startWith expressions and follow nested array fields correctly. Handle cycles, traversal depth and missing values, and align validation errors with MongoDB.

Add regression tests for #218.

Cover the original projection example from issue #218 using user: "$user._id". Verify that user documents are replaced by their IDs and unrelated fields are excluded.
Evaluate startWith expressions and resolve connectFromField through embedded documents and arrays. Traverse breadth first, track visited document IDs and preserve source documents.

Cover issue #218, cycles, shortest depths, maxDepth, sparse arrays, literal and duplicate start values, null links and independent inputs. Null links must not match missing target fields.
Compare missing startWith and invalid maxDepth/depthField options through AbstractAggregationTest against MongoDB 7.0.48. Match upstream error codes and messages, including the BSON bool type alias.
@bwaldvogel
bwaldvogel force-pushed the fix/graph-lookup-nested-fields branch from 776ff0b to ac70229 Compare November 16, 2026 07:56
@bwaldvogel
bwaldvogel merged commit 96df844 into main Nov 16, 2026
3 checks passed
@bwaldvogel
bwaldvogel deleted the fix/graph-lookup-nested-fields branch November 16, 2026 08:29
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.

1 participant