---
title: "pages"
description: "Custom pages , paging through pages query"
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/storefront-api/online-store/queries/pages'
  md: 'https://developer.shopline.com/docs/storefront-api/online-store/queries/pages.md'
---
# pages

Custom pages , paging through pages query

- **API Version:** v20270301
- **API Type:** Storefront
- **API Protocol:** GraphQL
- **Operation Type:** Query

## Type Signature

`PageConnection`

## Arguments

* `after`

  [String](https://developer.shopline.com/docs/storefront-api/common/scalars/string.md)

  Returns elements following the specified cursor. The `first` argument must also be specified when using this argument.

* `before`

  [String](https://developer.shopline.com/docs/storefront-api/common/scalars/string.md)

  Returns elements preceding the specified cursor. The `last` argument must also be specified when using this argument.

* `first`

  [Int](https://developer.shopline.com/docs/storefront-api/common/scalars/int.md)

  Returns the first n elements in the list. 

* `last`

  [Int](https://developer.shopline.com/docs/storefront-api/common/scalars/int.md)

  Returns the last n elements in the list. 

* `reverse`

  [Boolean](https://developer.shopline.com/docs/storefront-api/common/scalars/boolean.md)

  Whether to reverse the order of the list. 
  
  ● true: reverse
  
  ● false: do not reverse
  
  Default value: false

* `query`

  [String](https://developer.shopline.com/docs/storefront-api/common/scalars/string.md)

  Query conditions

* `sortKey`

  [PageSortKeys](https://developer.shopline.com/docs/storefront-api/online-store/enums/page-sort-keys.md)

  Sorting conditions

## Returns

* `edges`

  [[PageEdge!]](https://developer.shopline.com/docs/storefront-api/online-store/objects/page-edge.md)

  A list of edges.

* `pageInfo`

  [PageInfo!](https://developer.shopline.com/docs/storefront-api/online-store/objects/page-info.md)

  Information to aid in pagination.

## Code Example

```graphql
 {
	pages(after, before, first, last, reverse, query, sortKey ) 
		 {
			# PageConnection fields
		}
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/storefront-api/overview.md#status-and-error-codes).

