apollo-datasource-cosmosdb
apollo-datasource-cosmosdb copied to clipboard
Setting the MaxItemCount
Hi @andrejpk , Is there a way to set the MaxItemCount option? I am trying to restrict a response based on the number of items returned in an array and not by its size. More info here https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-pagination
Is there any update on how this can be achieved?
I'm trying to implement relay-style cursor pagination but can't limit the results because of the findManyByQuery() function calling fetchAll for the query. MaxItemCount doesn't affect the result in the end.
That seems really useful and maybe not too hard. I don't think I can put much time into this soon so happy to take a PR if you'd like to take a shot at it. Otherwise I can look into it when I free up a bit.