getCategoryTreeGql
Fetches a category tree.
It receives data from the GraphQL Api.
Signature
declare function getCategoryTreeGql(
context: BigcommerceIntegrationContext
): Promise<GraphQL.CategoryTreeItem[]>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | BigcommerceIntegrationContext |
Returns
Returns a response with the category tree data.
Referenced Types
Examples
Fetching category tree.
import { sdk } from '~/sdk.config.ts';
const categoryTree = await sdk.bigcommerce.getCategoryTreeGql();