# Custom Queries
# Features
From VSF2 docs (opens new window), we can use custom query on existing APIS. Most of the apis use 'customQuery' index.
# Use Cart
const { load: loadCart, cart } = useCart();
await loadCart({ customQuery: { cartLoad: 'customCartLoad' } });
# Use Category
const { categories, search: searchCategories } = useCategory();
await loadCart({ pageSize: 100, customQuery: { getCategory: 'customGetCategory' } });
# Use CountrySearch
# Use Facet
- getProductTemplatesList
await search({
...uiHelper.getFacetsFromURL(),
customQueryProducts: {
getProductTemplatesList: 'customProductTempalteListCategory',
},
customQueryCategories: {
getCategory: 'customCategoryQuery',
}
});
# Use Password
# Use Product
- getProductTemplate
await search({
id,
customQuery: { getProductTemplate: 'customProductTemplateQuery' },
});
# Use ProductVariant
# Use Shipping
# Use User
- signUpUser
await register({
user: form.value,
customQuery: { signUpUser: 'customSignUpUserMutation' },
});
# Use User Billing
# Use Wishlist
# Use Order
- ordersGet
await search({ customQuery: { ordersGet: 'customOrdersGetQuery' } });