I’m not sure whether you’re supposed to use the full GID in graphql query syntax in general. I would assume that you should but there aren’t really any docs on it.
Query:
query variantsByCollection($query: String!) {
productVariants(first: 3, query: $query) {
nodes {
title
sku
inventoryQuantity
}
}
}
Variables:
{
"query": "collection:'483199713601' AND inventory_quantity:>0"
}
When I use just the ID number itself, this query works half of the time and half of the time it throws an internal error (I submitted a support ticket).
When I use the full GID, it always returns back no results.


