findSuggestions
Search term and product item suggestions by the term input value (text), with 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 findSuggestions query.
This method is in beta and can change in the future.
Signature
declare function findSuggestions(
params: QueryParams<QueryFindSuggestionsArgs>
): Promise<SuggestionResult>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
params | Required | QueryParams<QueryFindSuggestionsArgs> |
Returns
List of matching items
Referenced Types
Examples
Find items by widget and pick which fields to return manually
const results = sdk.brd.findItemsByWidget({
text: 'bolts'
`
});
results.items // found items