Closed maxmezzomo closed 3 years ago
I have not found any way to fetch the purchasable flag from the GraphQL API.
In this project, we use the GraphQL API when possible, if not we use the Management API.
Alright nice, I guess they only have it through the management, hopefully they add it to the GraphQL one.
Variant type is currently defined as
The product section on dashboard allows setting variants to purchasable or not. would be a nice small addition to include that in the Storefront API response and in these hooks. In the meantime setting the inventory to 0 works but its not the same.
It's not clear to me what the relationship between the storefront API and the management API is. Looking at https://developer.bigcommerce.com/api-reference/store-management/catalog/product-variants/getvariantbyid it seems that the storefront hooks and the typings it provides do not necessarily try and follow the management API which I think is fine and good as its got a different purpose. The only issue is that the purchasable toggle feature on the UI dashboard that store admins would use is then redundant if only fetching data use the storefront hooks, if that's correct.
Thanks for the time, Best