Hi all,
I’m wondering if anyone knows there’s a local query method that can be used to compare a query to a saved object.
Example:
const obj = await new Parse.Query("Test").first();
const query = new Parse.Query("Test").equalTo("foo", "bar");
query.isInQuery(obj) // some method that tells me whether obj is in the query
At the moment my workaround is (not ideal as it creates a network request):
const obj = await new Parse.Query("Test").first();
const isInQuery = async (query, object) => {
const isFound = await query.equalTo("objectId", object.id).first()
return !!isFound
}
const query = await new Parse.Query("Test").equalTo("foo", "bar").first();
await isInQuery(query, obj)