I’m working on quite the complex Shopify Flow. I’ll spare you the details of the calculations before this point, but I essentially have a list of product IDs structured as such, as a string:
[“gid://shopify/Product/8258451439839”, “gid://shopify/Product/8258451439838”]
I would now like to use the ‘get product data’ action to get the products with the matching IDs, and then add a tag ‘sold out’ to those products. I just can’t seem to figure out how to write the advanced query on that ‘get product data’ action. I tried a few options below from other resources, but none seemed to work…
This is the last part of quite the extensive shopify flow that is now working perfectly, and I’d hate for it to now go wrong at that last step…
query Products($ids: [ID!]!) {
nodes(ids: $ids) {
... on Product {
id
title
images (first: 1){
nodes {
url(transform: {maxHeight: 80, maxWidth: 80})
}
}
}
}
}
variables: {"ids": ["gid://shopify/Product/8153588367651", "gid://shopify/Product/8153588465955", "gid://shopify/Product/8153588793635", "gid://shopify/Product/8153588695331", "gid://shopify/Product/8153589023011"]}
query MyQuery {
products(first: 20, query: "(id:8042415816983) OR (id:8105484845335)") {
edges {
node {
title
id
}
}
}
}