2021-02-23 14:30:52 +00:00
|
|
|
class ProductDetails {
|
|
|
|
getProductDetails(productId, channelId) {
|
|
|
|
const query = `fragment BasicProductFields on Product {
|
|
|
|
id
|
|
|
|
name
|
|
|
|
}
|
|
|
|
query ProductDetails{
|
|
|
|
product(id: "${productId}", channel: "${channelId}") {
|
|
|
|
...BasicProductFields
|
|
|
|
isAvailable
|
|
|
|
isAvailableForPurchase
|
|
|
|
availableForPurchase
|
|
|
|
}
|
|
|
|
}`;
|
2021-02-26 14:34:35 +00:00
|
|
|
return cy.sendRequestWithQuery(query, "token");
|
2021-02-23 14:30:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
export default ProductDetails;
|