openbridge.pages.list().select(fields)
openbridge.pages.get(handle).select(fields)
Limits which fields to include in the response. Use this to optimize performance by reducing payload size.
By default, all fields are returned. Use .select() only when you want to optimize by fetching fewer fields.
Parameters
| Param | Type | Required | Description |
|---|
fields | PageField[] | Yes | Array of field names |
Returns
PagesQueryBuilder (chainable)
Available Fields
type PageField =
| 'id'
| 'handle'
| 'title'
| 'body'
| 'bodySummary'
| 'createdAt'
| 'updatedAt'
| 'onlineStoreUrl'
| 'seo'
Examples
Select specific fields
const { items } = await openbridge.pages
.list()
.select(['title', 'handle', 'bodySummary'])
Minimal data for navigation
const { items } = await openbridge.pages
.list()
.select(['title', 'handle'])
Full content for page display
const page = await openbridge.pages
.get('about-us')
.select(['title', 'body', 'seo'])