Skip to content

Instantly share code, notes, and snippets.

@victorwhy
Last active January 21, 2020 18:34
Show Gist options
  • Save victorwhy/3d5f3c19a4808811f758012c6984a121 to your computer and use it in GitHub Desktop.
Save victorwhy/3d5f3c19a4808811f758012c6984a121 to your computer and use it in GitHub Desktop.
Shopify Graph QL query to be the "products" JAPI endpoint
{
products(first: 3) {
edges {
node {
id
...variantData
}
}
}
}
fragment variantData on Product {
title
description
onlineStoreUrl
variants(first: 100) {
edges {
node {
id
availableForSale
sku
price
title
image {
id
src
}
selectedOptions {
name
value
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment