A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
I have a lot of products and want to get all the inventoryItemIds from my store so I can use them for other operations. Is there an easy way to do this?
Yes! Yes there is an easy way to do this. Here is the easiest way I know.
mutation{
bulkOperationRunQuery(
query:"""
{
products {
edges {
node {
id
variants {
edges {
node {
inventoryItem {
id
}
}
}
}
}
}
}
}
"""
) {
bulkOperation {
id
status
}
userErrors {
field
message
}
}
}