GraphQL PatientList query not returning all patien...
# support
s
This is also happening for PractitionerList as well - in our dev project we have a bunch of data but for some reason our graphQL results (even very simple queries eg. { PatientList { id } } is not returning all the results but only a small subset. We have confirmed this is happening on https://graphiql.medplum.com/ as well, whereas within app.medplum.com we see all the patients and practitioners the graphql response is only 20.
r
Hi @stefant1707 ! Without any additional modifiers, the Medplum server puts a default limit of 20 on every search. See our paginated search docs for more info! https://www.medplum.com/docs/search/paginated-search
You can add the
_count
and
_offset
search parameters to your GraphQL query, the same way you would for a basic REST search, to page through results
s
oh interesting, thanks!
so this is for every different type of resource there's a hidden default of limit 20?
not just paginated search?
oh yep, it works! thanks
r
Yes, for every resource type, the default search count is 20. The goals is to avoid having clients accidentally crash because they got more data than they expected
it's equivalent to every search having a default of
_count=20
, unless otherwise specified
160 Views