Glengall Handbook
Design

Pagination is part of the contract

Explain how a reader knows there is another page.

Choose a navigation model

A page number, an offset and a cursor are not interchangeable promises. Explain what the client sends on the next request and whether the result can change while they move through it.

Make the end unambiguous

Document how the last page is represented. An absent next cursor, an empty list and a total count each communicate something different. Clients should not have to guess whether a short page means they are finished.

Use a small example

Show the first response and the next request side by side. If the cursor is opaque, tell readers to return it without interpreting it. Keep filters and ordering consistent throughout the example so the navigation step is the only new detail.

Open the workbench → · Back to the notes

Keep reading