You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
Currently we load all search results from the server in one go. This becomes a problem when searching for a very popular package as it adds a huge drain on the server and takes a long time to display.
We just added pagination support to the api in 17d5bf1, but the UI needs to be updated to actually use it.
Gotcha
When doing pagination we don't know the total number of search results until the very end. It might be possible to get this number in some other way, but for know we shouldn't depend on it.
So since we don't know the total number of results, it's hard to do page-based pagination (since we don't know how many pages there is). So infinite scroll seems like a better solution right now.
API
The API supports two pagination query arguments:
limit - The number of results to return (default: -1, no limit)
gt - The name of the last dependent in the previous result
Currently we load all search results from the server in one go. This becomes a problem when searching for a very popular package as it adds a huge drain on the server and takes a long time to display.
We just added pagination support to the api in 17d5bf1, but the UI needs to be updated to actually use it.
Gotcha
When doing pagination we don't know the total number of search results until the very end. It might be possible to get this number in some other way, but for know we shouldn't depend on it.
So since we don't know the total number of results, it's hard to do page-based pagination (since we don't know how many pages there is). So infinite scroll seems like a better solution right now.
API
The API supports two pagination query arguments:
limit
- The number of results to return (default:-1
, no limit)gt
- The name of the last dependent in the previous resultAPI Example
Request 1:
/api/opbeat/*?limit=2
Request 2:
/api/query/opbeat/*?limit=2>=anyfetch-provider
The text was updated successfully, but these errors were encountered: