Hi 👋
I have a question regarding a GraphQL query on Practitioner.
I’m fetching a list of practitioners (pagination is already handled on my side), and for each practitioner I retrieve several fields, including the associated ServiceRequest resources.
My goal is simply to get the total number of ServiceRequests per practitioner.
The issue I’m running into is the following:
if I set count to n on the ServiceRequest field and a practitioner has n + 50 ServiceRequests, the query only returns n items, and there’s no way to know the actual total (n + 50).
Pagination works well at the Practitioner level, but the limitation here is on the nested resources (ServiceRequest) inside the GraphQL query.
I’m already using a main GraphQL query and would like to avoid making an additional Medplum call just to retrieve the total number of ServiceRequests.
👉 What is the recommended approach in Medplum GraphQL for this use case?
Is there a way to access the total count of related resources even when the returned list is limited?
Thanks in advance for your help 🙏