Elliot
09/09/2025, 4:27 AMnext is always null, even when there are more items. Is this assessment accurate, and if so, is supporting cursor based pagination planned? i'm happy to create a ticket in github if that's the correct next step.Maddy
09/09/2025, 11:56 PM_sort=-_lastUpdated, and you should be able to reach past the 10k resources mark. Our customers have been able to do with graphql when using this parameter (and nothing else added to _sort), it uses the same codepath as our normal search https://www.medplum.com/docs/search/paginated-searchElliot
09/11/2025, 3:53 PMnext parameter (which contains the cursor) is packaged into the Bundle container and that's easy to find. The graphQL interface doesn't return this bundle structure but it does provider a next parameter on *Connection queries, for example:
query {
TaskConnection(_sort: "_lastUpdated") {
next
last
first
previous
pageSize
edges {
resource {
id
}
}
}
}
running the above with medplum.graphql gives a response that looks like this:
{
"data": {
"TaskConnection": {
"next": null,
"last": null,
"first": null,
"previous": null,
"pageSize": 20,
"edges": [...]
I checked the full http request to double check next wasn't returned in the headers or something. Can you tell the me the right way to access a cursor when using the graphQL interface? I checked all available docs and the original PR that implemented cursor search but it wasn't clear to me where the search links are exposed through GraphQLMaddy
09/16/2025, 6:26 PMlink to your query parameters might expose the next parameter?Elliot
09/17/2025, 5:01 AMlink isn't a parameter to the TaskConnection or TaskList query type, or a field of the`TaskConnection` or TaskList return types, so adding it anywhere on the query i shared above is just a type error:
"details": {
"text": "Cannot query field \"link\" on type \"TaskConnection\"."
}
There is of course a link on the Bundle type and I assume this is what you're referencing (and also where we would find _cursor on a non-graphql query), but graphQL queries don't wrap the results in a Bundle by default and I don't see any way to construct a query where results for some arbitrary query are wrapped in a Bundle. if you have a basic working example of course please let me know.cody
09/20/2025, 1:44 AMBundle has the values, it's just not being returned in the Connection API at the moment.
https://github.com/medplum/medplum/issues/7428cody
09/20/2025, 9:05 PM