I'm using parse server cloud function to query a class using master key. The class object has the ACL to allow read only to the user who created the object. The query gives me zero results. But as soon as I change ACL on my test object to public read/write, the cloud function query gives me the desired object. As far as I know, using master key I should have got the objects on query. Anyone knows what the issue here is?
const mQuery = new Parse.Query('MyClass');
mQuery.equalTo('objectId', mObjectId);
const result = await mQuery.first(null, {useMasterKey : true});
console.log("mQuery",mQuery);
console.log("result",result);
if (!result) {
throw new Error('no data found.');
}
Here the result is logged as undefined. Once the object is made public, the result is the public object. I'm using parse server 3.x.