"Invalid query parameter $all" and "Unknown operator: $and"
Hello,
I am trying to query documents in a collection based on an array of strings where I want to check if it is containing certain values. I am using mongodb/mongoose and I have tried using $all/$and. I would prefer to be using $all in this example, but upon the error I gave $and a try.
The expected behavior is a response within an Angular app with documents living up to this query. The error occurs when this throws an error stating: "Invalid query parameter $all" / "Unknown operator: $and"
query: { residence: { facilities: { $all: [ "dishwasher", "furnished" ] } } }
NodeJS version: v14.15.1
Operating System: Windows 10
Browser Version: Google chrome 91.0
Angular Version: 11.0.2
You must whitelist the operators in the service options for them to works.
https://docs.feathersjs.com/api/databases/common.html#service-options