Skip to main content
openbridge.articles.list().select(fields)
openbridge.articles.get(id).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
fieldsArticleField[]YesArray of field names

Returns

ArticlesQueryBuilder (chainable)

Available Fields

type ArticleField =
    | 'id'
    | 'handle'
    | 'title'
    | 'content'
    | 'contentHtml'
    | 'excerpt'
    | 'excerptHtml'
    | 'publishedAt'
    | 'image'
    | 'blog'
    | 'author'
    | 'tags'
    | 'onlineStoreUrl'
    | 'seo'

Examples

Select specific fields

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

Minimal data for listing

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

Full content for article page

const article = await openbridge.articles
    .get('gid://shopify/Article/123')
    .select(['title', 'contentHtml', 'image', 'author', 'publishedAt', 'seo'])