Home > @vue-storefront/magento-api > productDetail
productDetail() function
Fetches the list of products with details using sort, filters and pagination.
Signature:
export default function productDetail(context: Context, searchParams?: GetProductSearchParams, customQuery?: CustomQuery, customHeaders?: CustomHeaders): Promise<ApolloQueryResult<ProductDetailsQuery>>;
Parameters
Parameter | Type | Description |
---|---|---|
context | Context | VSF context |
searchParams | GetProductSearchParams | (Optional) params with sort, filters and pagination |
customQuery | CustomQuery | (Optional) (optional) - custom GraphQL query that extends the default query |
customHeaders | CustomHeaders | (Optional) (optional) - custom headers that extends the default headers |
Returns:
Promise<ApolloQueryResult<ProductDetailsQuery>>