-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Track 8/9] Users query #30
Comments
Finish |
Step 2/2 - PaginationEstimated time: 6 hoursNow, let's increment your Let's consider our alphabetically ordered list of users. Change the query response type to be of the type below:
The client should have the possibility, using optional parameters, to:
In case it's not that clear yet, let's take an example to help: an e-commerce app has to implement a feature of listing all the past orders for a user. The creation team decided that it's going to show, from the most recent to the oldest, the first 10 orders. If the user starts scrolling and reaches some point, 10 more should load. If he/she continues to scroll, 10 more are shown, and so on, until he/she reaches the last order. In this case, the app should ask the server, in that order:
Let's say some user has a total of 35 orders. The steps above would be repeated until the client asks for the last 10 orders (after 30th), in which the server would return the 5 last orders, and the information that are no more orders to be loaded. If you search on the internet, you're going to find different ways of doing pagination, but in general they follow the rules listed above. You can choose anyway you want to do this, given they are followed. NOTE: as usual, don't forget to write the tests for you query! |
Finish |
Click here for your next track |
Step 1/2 - Only list
Estimated time: 2 hours
Your task now is to create a new query called
Users
.The text was updated successfully, but these errors were encountered: