Hi,
I am trying to execute the following command and do not get the results as expected as this is the same command as used in the class chapter 3 $graphLookup: maxDepth and depthField
db.child_reference.aggregate([
{
$match: {name: “Dev”},
},
{$graphLookup: {
from: "child_reference",
startWith: "$direct_reports",
connectFromField: "direct_reports",
connectToField: "name",
as: "descendants",
maxDepth: 1,
depthField: "level"}
}
]).pretty
I am not able to identify the issue
Any help?
Thanks