Increase MaxCursorSize from 100 to 500 to allow larger page sizes, and set the measures list frontend query to fetch 500 items per page by default.
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
Enforce minimum (25) and maximum (100) bounds on cursor size to prevent negative values or excessively large page sizes. All three API surfaces (GraphQL, MCP, CLI) funnel through NewCursor, so the fix belongs here.
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit overhauls the pagination system to support flexible ordering
beyond the default created_at timestamp:
- Change CursorKey from fixed byte array to structured object with ID and Value
- Add OrderField and OrderDirection types to support different sorting options
- Update SQLFragment to dynamically generate SQL based on field and direction
- Modify cursor navigation logic to consider custom ordering
- Simplify Position type to use string constants instead of numeric values
- Update Page struct to include reference to Cursor
These changes allow paginated queries to be ordered by different fields
(created_at, updated_at, name) in either ascending or descending order
while maintaining consistent cursor-based pagination behavior.
Signed-off-by: gearnode <bryan@frimin.fr>