Skip to content

Commit ccb9f46

Browse files
committed
Add product variations to singleproduct GQL query
1 parent 22e0ba2 commit ccb9f46

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

components/Product/SingleProduct.component.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ const SingleProduct = ({ product }) => {
1414
setIsLoading(false);
1515
}, []);
1616

17+
console.log("Product information: ");
18+
console.log(product);
19+
1720
const {
1821
description,
1922
image,

utils/const/GQL_QUERIES.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ export const GET_SINGLE_PRODUCT = gql`
2323
... on VariableProduct {
2424
price
2525
id
26+
paColors {
27+
nodes {
28+
name
29+
}
30+
}
31+
paSizes {
32+
nodes {
33+
name
34+
}
35+
}
2636
}
2737
... on ExternalProduct {
2838
price

0 commit comments

Comments
 (0)