findItemsByKeyword
Search product items by the search term (text) with the pagination input and the optional queryHint (see QueryHintInput for detail)
This method sends a GET request to the search endpoint of the Vue Storefront API Middleware. In turn, it receives data from the Bloomreach GraphQL Commerce API using findItemsByKeyword query.
Signature
declare function findItemsByKeyword(
params: QueryParams<QueryFindItemsByKeywordArgs>
): Promise<ItemsPageResult>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
params | Required | QueryParams<QueryFindItemsByKeywordArgs> | Check the type for more information |
Returns
List of matching items
Referenced Types
Examples
Getting products by keyword
const data = await sdk.brd.findItemsByKeyword({
text: 'Greenlee'
});
data.items // matching productsGetting products by keyword
const data = await sdk.brd.findItemsByKeyword({
text: 'Greenlee',
expect: `items { displayName }`
});
data.items // matching products