How to join populated row by count
I am using useSimpleList, with the following config:
meta: {
populate: {
jobRole: {
fields: '*'
}
}
}
I am getting all jobRole related which the main query for each row
But instead of that, I need to get the count of jobRoles per each row, instead of the array of elements
Is it possible to do that count functionality it with the query in a native way?
2 Replies
Hi @Facu. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. The information extracts provided do not contain specific details on how to achieve a count functionality with the
useSimpleList
hook in refine.
However, refine does provide a way to request estimations of the total count by passing the count
property in the meta
as shown in the useList
hook example from the Supabase documentation (https://refine.dev/docs/packages/documentation/data-providers/supabase/#getlist---performance).
This might not directly apply to your case, but it could give you a hint on how to proceed. For more specific guidance, I recommend checking the refine documentation (https://refine.dev/docs) or seeking help from the community on the refine Discord server (https://discord.com/channels/837692625737613362/).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@411223164698492929> kapa.ai is still learning and improving, please let us know how it did by reacting below