$graphLookup lab super confusing

I was able to answer this right only because I understood which collection to apply my pipeline to first. My greatest difficulty with aggregation pipelines in general is I don’t grasp how the parameters for each pipeline step are chosen. Looking at the detailed answer, in some cases they don’t even match the data structures in the actual documents and I don’t know where they come from. I can only guess there’s some new documents being created that I don’t see. (I’m being vague to avoid answering too much about the lab answer.)

I’ve read the detailed answer but it just raises more questions. Is there a more detailed “detailed answer” to explain how we should use these operators ourselves, or some resource online that explains it better?


@Jeremy_16271, the first place to look (for any stage/operator/terminology) is the documentation. At the start of this $graphLookup doc, there’s a very easily understandable set of steps describing how it all comes together. The same doc also mentions that the “as” argument/parameter is the return value of $graphLookup which is an array.

The next place to look would then be the numerous discussions around this graphLookup stage.

That’s how to tackle this course.

If you still have doubts after going through all of the above, then feel free to ask specific (non-revealing) questions.

1 Like

Hi @Jeremy_16271,

Thanks for sharing the feedback!!
Firstly I would recommend you to go through Aggregation documentation to understand the concepts well.

Please check your discourse inbox to have discussion about any of your doubts.


A post was split to a new topic: What does the $startWith argument contain in a $graphLookup stage?

A post was merged into an existing topic: What does the $startWith argument contain in a $graphLookup stage?