Another syntax question - $

in a graphLookup the only value on the right side of the : symbol with a is the startWith parameter. i.e.

db.airlines.aggregate([
{$match: {name: “TAP Portugal”}},
{$graphLookup: {
from: “routes”, FOREIGN COLLECTION
as: “chain”, ANY STRING NAME
startWith: “$base”, FIELD IN ROUTES COLLECTION
connectFromField: "dst_airport, FIELD IN ROUTES COLLECTION
connectToField: “src_airport”, FIELD IN ROUTES COLLECTION
maxDepth: 1
}}])

I looked at the Manual about the $ symbol - but I’m not getting it… why does this field alone use it?

image

All of the commonly used options are of type string or number, however, the type for startWith is an expression. “base” without the dollar($) doesn’t resolve to an expression.