May 2019
Intermediate to advanced
496 pages
10h 38m
English
Our endpoint, by default, returns at most 10 records. To get more than that, we can page through the result set by using the after parameter, which takes a customer ID. The server will skip through results until it finds that ID and returns the one after it.
Remember that customers are in alphabetical order by first name, so their IDs most likely won't be in order. But we can still use after because searches should be mostly stable between calls.
We'll add Next and Previous buttons that will help us move between search results. Clicking Next will take the ID of the last customer record currently shown on the page, and send it as the after parameter to the next search ...
Read now
Unlock full access