API Design · Senior · Question 74 of 75
Why should pagination tokens be tied to the query that produced them?
- 1Tokens must contain the full result set
- ✓Correct answer: If a client reuses a token with different filters or sort, results become inconsistent; encode or validate the query in the token and reject mismatches
- 3Tokens should work with any query
Explanation
Google's AIP-158 recommends that page tokens are only valid with the same parameters.