Alokai

findItemsByCategory

Searches for items inside category.

This method comunicates with the search endpoint of the Vue Storefront API Middleware. In turn, it receives data from the Bloomreach GraphQL Commerce API using findItemsByCategory query.

Signature

declare function findItemsByCategory(
	params: QueryParams<QueryFindItemsByCategoryArgs>
): Promise<ItemsPageResult>;

Parameters

NameRequiredTypeDescription
paramsRequiredQueryParams<QueryFindItemsByCategoryArgs>Check the type for more information

Returns

List of matching items

Referenced Types

Examples

Getting items by category Id

  const data = await sdk.brd.findItemsByCategory({
    categoryId: 'PNB250864140000'
  });
  data.items // results

Getting whitelistening what to return

  const data = await sdk.brd.findItemsByCategory({
    categoryId: 'PNB250864140000',
    expect: `items { displayName }`
  });
  data.items // items only have `displayName` property

On this page