Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API requests for pageable data should include property in response indicating additional data available #1738

Open
benheng opened this issue Feb 26, 2018 · 2 comments

Comments

@benheng
Copy link
Contributor

benheng commented Feb 26, 2018

Related to /pull/1706

In the above PR, the front-end is making two API requests to manually check if there exists at least 1 more item after the page, then it requests the items for the current page. It would be a lot cleaner if the back-end just returned this status as part of the response object. It doesn't even have to contain the total count, as that may have some performance implications. Just that there is at least 1 more item after the current page.

@ssalinas
Copy link
Member

We have endpoints for some of these already (ones ending in withmetadata) that return a page and count along with the data. Unfortunately we've found the counting to be rather slow in SQL, so we'll likely need to find a way to speed it up before they are viable for regular use

@mikebell90
Copy link
Contributor

Is it feasible to ask for n + 1 objects when issuing the query? Then you don’t need a count per se

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants