Last active
February 5, 2019 13:23
-
-
Save rodde177/df97208ec0d4db72109f834aa8dec7a6 to your computer and use it in GitHub Desktop.
Configurable Product GraphQl query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query productDetail($urlKey: String, $onServer: Boolean!) { | |
productDetail: products(filter: {url_key: {eq: $urlKey}}) { | |
items { | |
sku | |
name | |
url_key | |
small_image | |
price { | |
regularPrice { | |
amount { | |
currency | |
value | |
} | |
} | |
} | |
description | |
media_gallery_entries { | |
label | |
position | |
disabled | |
file | |
} | |
... on ConfigurableProduct { | |
configurable_options { | |
attribute_code | |
attribute_id | |
id | |
label | |
values { | |
default_label | |
label | |
store_label | |
use_default_value | |
value_index | |
} | |
} | |
variants { | |
product { | |
id | |
media_gallery_entries { | |
disabled | |
file | |
label | |
position | |
} | |
sku | |
stock_status | |
} | |
} | |
} | |
meta_title @include(if: $onServer) | |
meta_keyword @include(if: $onServer) | |
meta_description @include(if: $onServer) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment