Vue Storefront is now Alokai! Learn More
Custom query

Custom query

This section will cover the basics of using custom queries.

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';

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

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