The @daffodil/navigation
Magento driver connects your storefront's menus to your Magento store.
import { provideMagentoDriver } from '@daffodil/navigation/driver/magento';
export const appConfig: ApplicationConfig = {
providers: [
provideRouter(routes),
provideMagentoDriver('https://some-magento-store.com/graphql'),
provideDaffNavigationMagentoDriver(),
],
};
By default, the underlying driver will call Magento's GraphQL API to retrieve the store's root category. You can skip this call by providing a rootCategoryId
to the provider configuration:
import { provideMagentoDriver } from '@daffodil/navigation/driver/magento';
export const appConfig: ApplicationConfig = {
providers: [
provideRouter(routes),
provideMagentoDriver('https://some-magento-store.com/graphql'),
provideDaffNavigationMagentoDriver({
rootCategoryId: 'Mg=='
}),
],
};