Created
December 2, 2024 09:11
-
-
Save petercossey/2bd640ebc5ff95325c024e7092c6d149 to your computer and use it in GitHub Desktop.
Fetch inventory for product variants at each location
This file contains hidden or 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 productById($productId: Int!) { | |
site { | |
product(entityId: $productId) { | |
id | |
entityId | |
name | |
sku | |
variants { | |
edges { | |
node { | |
inventory { | |
byLocation { | |
edges { | |
node { | |
locationEntityCode | |
availableToSell | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
This file contains hidden or 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
{ | |
"productId": 111 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See Fetch inventory for variants at each location