Hello!
We're using the GQL api to examine ShippingZones and DeliveryProfiles to answer the question: "does this shop provide free shipping on all products?" Our first attempt was to see how many variants were in the deliveryProfile and compare that to the total number of products, thinking that if those were equal, then the profile applied to everything.
So far, we've found out that we can find the number of variants which are associated with a DeliveryProfile by a query like this:
{
deliveryProfile(id: "gid://shopify/DeliveryProfile/XXXXXXX") {
id
name
default
productVariantsCountV2 {
count
capped
}
}
}
For a large shop, that will, of course, report `{ count: 500, capped: true }`, making my strategy useless. Is there another way to figure out whether the profile applies to everything or just certain products?
User | Count |
---|---|
6 | |
6 | |
5 | |
5 | |
5 |