Skip to main content
shoppy.collections.select(fields)
Specifies which fields to include in the response. Reduces payload size.
This is a chainable method. Call .list() or .get() to execute.

Parameters

ParamTypeRequiredDescription
fieldsCollectionField[]YesFields to include

Available Fields

FieldType
idstring
handlestring
titlestring
descriptionstring
descriptionHtmlstring
imageShopifyImage
seoShopifySeo
updatedAtstring

Returns

CollectionsQueryBuilder (chainable)

Examples

Minimal fields

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

For collection cards

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

For collection page

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

For navigation

const { items } = await shoppy.collections
    .select(['title', 'handle'])
    .limit(10)
    .list()
If .select() is not called, default fields are returned.