Skip to content

Cursor pagination

Forward opaque server cursors and optional page sizes without decoding or rewriting them.

Updated View as Markdown
Audience: application-backendPlane: adminAuth: management-keyStatus: beta

Cursor values are opaque strings owned by the Admin API. Store and return them unchanged.

import { cursorPage } from '@nexus/sdk-typescript';

const page = cursorPage('opaque-server-cursor', 20);
const usage = await nexus.listUsageEvents({
  path: { workspaceId },
  query: page,
});

cursorPage(cursor, limit) omits either property when it is undefined. It does not decode, validate, sign, or alter the cursor and does not automatically fetch subsequent pages.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close