Skip to main content
openbridge.pages.before(cursor)
Fetches pages before the given cursor for backward pagination.

Parameters

ParamTypeRequiredDescription
cursorstringYesCursor from previous pageInfo

Returns

PagesQueryBuilder (chainable)

Examples

Paginate backward

// Get a page
const currentPage = await openbridge.pages.limit(10).list()

// Get previous page
if (currentPage.pageInfo.hasPreviousPage) {
    const previousPage = await openbridge.pages
        .limit(10)
        .before(currentPage.pageInfo.startCursor)
        .list()
}