Skip to main content
shoppy.pages.list()
Executes the query and returns a list of pages with pagination info.

Parameters

None

Returns

PagesResult
{
  items: ShopifyPage[]
  pageInfo: {
    hasNextPage: boolean
    hasPreviousPage: boolean
    startCursor: string
    endCursor: string
  }
}

Examples

Basic usage

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

With chained methods

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

Check for more pages

const { items, pageInfo } = await shoppy.pages.limit(10).list()

if (pageInfo.hasNextPage) {
    // More pages available
}