PaginationMetadata: PaginationOptions & { _stage?: "query" | "extraction" }

Pagination metadata that can be attached to array schemas

The _stage field indicates where pagination was applied:

  • "extraction": Apply during graph traversal (default)
  • "query": Already applied at SPARQL CONSTRUCT query stage (skip during extraction)

The orderBy field specifies sort criteria (Prisma-style):

  • Required for consistent pagination on blank nodes (unnamed nodes)
  • Optional for named nodes
  • Can be single object or array: { name: 'asc' } or [{ name: 'asc' }, { createdAt: 'desc' }]