I am trying to run a query and want to aggregate results based on location,
here is the query + aggregation
let qry = Users.find();
qry.where('userType').equals('provider');
qry.where('firstName').equals(firstName);
let ret = await Users.aggregate().near(
{ near: [lng, lat],
maxDistance: radiusInMiles * MILES_TO_METERS,
distanceField: 'distance',
query: qry
} ).exec();
when I try to run this, I get a
"cyclic dependency detected" error, any ideas...