I am using Shopify Functions and I have this query
query RunInput {
cart {
lines {
id
quantity
merchandise {
… on ProductVariant {
id
product {
id
inCollections(ids: [“gid://shopify/Collection/306253987991”]) {
collectionId
}
}
}
}
}
}
}
The issue is that inCollectiuons returns the id, and therefore true, whether it is present or not.
Is there any way to just get a list of collections that product is part of so I can do a quick filter on it to check.
I am wanting to target cart items that are part of a specific collection.
Thanks