resolver.define("fetchTargetProject", async (req) => {
try {
const result = await storage
.entity("target-project")
.query()
.index("by-targetSite")
.where(WhereConditions.equalsTo(req.payload.targetSite.label))
.getMany();
return result;
} catch (error) {
console.error(
"Error retrieving target project object by target site:",
error
);
}
});
Code in static part is below :-
useEffect(() => {
if (targetSite !== null) {
invoke("fetchTargetProject", { targetSite }).then(setTargetProjData);
}
}, [targetSite]);
I dont know how many total records are stored in the entity. While getting the records, I am getting only 10 but want to get them all. Kindly help in how to get them all