I got error : Invalid query parameter title $regex
I thought this was an error that occurred in QueryValidator on service hooks, but it was not.
I was able to find out that it was an error that occurred in validateQueryProperty in adapter-commons.
I resolved it append operators:['$regex'] to service class constructor options.
svc = new MyService({ operators: ['$regex'] })
app.use('myservice', svc)
operators {string[]} (optional, deprecated) - A list of additional non-standard query parameters to allow (e.g [ '$regex' ]). Not necessary when using a [query schema](https://feathersjs.com/api/schema/validators.html#validatequery)
"deprecated and not necessary". but the operator option was required.
I read source code of @feathersjs/mongodb version 5.0.21 and
noticed that the .find method still utilizes the sanitizeQuery function.
Steps to reproduce
I got error : Invalid query parameter title $regex
I thought this was an error that occurred in QueryValidator on service hooks, but it was not. I was able to find out that it was an error that occurred in validateQueryProperty in adapter-commons.
I resolved it append operators:['$regex'] to service class constructor options.
but, there was a difference from the documentions. (https://feathersjs.com/api/databases/common.html#options)
operators {string[]} (optional, deprecated) - A list of additional non-standard query parameters to allow (e.g [ '$regex' ]). Not necessary when using a [query schema](https://feathersjs.com/api/schema/validators.html#validatequery)
"deprecated and not necessary". but the operator option was required.
I read source code of @feathersjs/mongodb version 5.0.21 and noticed that the .find method still utilizes the sanitizeQuery function.
Expected behavior
I believed that using queryValidator in the hooks would make that operator option unnecessary, but it still seems to be needed.
I think this feathers framework is really excellent and I use it as my main framework. therefore, I always feel grateful to the development team.
I'm posting this issue so other developers can find it when they search for similar problems.