We are building an API with pagination and continuation token, so that our consumer can use the continuation token for the next call. We are using CosmosRepository with spring.
This is the dependency we are using:
The above code is throwing an exception:
com.azure.spring.data.cosmos.exception.CosmosAccessException: Too many results - return type interface com.azure.core.http.rest.Page is not of type Iterable but find returned 2 results] with root cause
If we use the spring Page in the return, then we won't be able to get the continuationToken
Can you please tell us how to implement Pagination with CosmosRepository and continuation token?
We are building an API with pagination and continuation token, so that our consumer can use the continuation token for the next call. We are using CosmosRepository with spring. This is the dependency we are using:
CosmosRepository code: com.azure.core.http.rest.Page findAllBy....(..., CosmosPageRequest request)
The above code is throwing an exception: com.azure.spring.data.cosmos.exception.CosmosAccessException: Too many results - return type interface com.azure.core.http.rest.Page is not of type Iterable but find returned 2 results] with root cause
If we use the spring Page in the return, then we won't be able to get the continuationToken
Can you please tell us how to implement Pagination with CosmosRepository and continuation token?