Skip to main content
openbridge.pages.list()
openbridge.pages.list().limit(10).select(['title', 'handle'])
Fetches a list of pages. Supports chaining methods to configure the query.

Chainable Methods

MethodDescription
.limit(count)Limit number of results (default: 250)
.after(cursor)Fetch results after cursor (pagination)
.before(cursor)Fetch results before cursor (pagination)
.search(query)Filter by search query
.reverse()Reverse the order
.select(fields)Limit returned fields

Returns

PagesResult
{
  items: ShopifyPage[]
  pageInfo: ShopifyPageInfo
}

Examples

Basic usage

const { items, pageInfo } = await openbridge.pages.list()

With limit

const { items } = await openbridge.pages
    .list()
    .limit(10)

With chained methods

const { items, pageInfo } = await openbridge.pages
    .list()
    .limit(10)
    .select(['title', 'handle', 'bodySummary'])

Pagination

const page1 = await openbridge.pages.list().limit(10)

if (page1.pageInfo.hasNextPage) {
    const page2 = await openbridge.pages
        .list()
        .limit(10)
        .after(page1.pageInfo.endCursor)
}