Skip to main content
openbridge.collections.list().select(fields)
openbridge.collections.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

ParamTypeRequiredDescription
fieldsCollectionField[]YesFields to include

Available Fields

FieldType
idstring
handlestring
titlestring
descriptionstring
descriptionHtmlstring
imageShopifyImage
updatedAtstring
onlineStoreUrlstring
seoShopifySeo

Returns

CollectionsQueryBuilder (chainable)

Examples

Minimal fields

const { items } = await openbridge.collections
    .list()
    .select(['id', 'title', 'handle'])

For collection cards

const { items } = await openbridge.collections
    .list()
    .select(['title', 'handle', 'image'])

For collection page

const collection = await openbridge.collections
    .get('summer-sale')
    .select(['title', 'descriptionHtml', 'image', 'seo'])

For navigation

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