I'm trying to cancel a job using payload.jobs.cancel, with a where clause filtering by the data I'm saving in the queue. But for some reason, the query goes through sanitizeQueryValue which is expecting a collection/global and throws an error because I have no 'fields'. I'm simply storing an ID and collection name (or global name).
I'm a little surprised the test is passing for db-mongodb, since it is also only using an ID, but maybe its being handled differently.
Is someone else able to cancel jobs similar to this?
Here is the error: TypeError: Cannot read properties of undefined (reading 'type') at sanitizeQueryValue