The Vue Storefront Essentials Course is now available! Learn More
Custom query

Custom query

This section will cover the basics of the items and how to fetch them

API Reference

You can find all available Bloomreach Discovery module methods and their description in the API Reference.

Using custom query

To fetch the response with usage of custom query, you can use the customQuery method.

import { sdk } from '~/sdk.config.ts';

const query = `#graphql
query findCategories($queryHint: QueryHintInput = null) {
  findCategories(queryHint: $queryHint) {
    displayName
  }
}`

const { findCategories: categories } = await sdk.brd.customQuery({
 query
});