A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
I am trying to add to the GraphQL call the AvailableQuantity attribute, but I have not been able to since yesterday.
According to what I have read in the documentation, the attribute is called AvailableQuantity (This same query does work in the GraphQl application).
But if I add this attribute to the query, it breaks.
Attached is a screenshot.
Hi @MichaelVai 👋
It's unclear which API version the app is using, but you should be able to use `ProductVariant.inventoryQuantity` field in version 2023-04. The `ProductVariant` object in our oldest stable version doesn't support a `availableQuantity` field.
Hope that helps!
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Are you referring to this?
I tried to change versions and got no solution, maybe I had to keep testing and clearing cache.
In general I have already tested both options, I have version 2022-07, and I had already tested inventoryQuantity.
I'm sorry for not saying it before, I also tried to change the version, and the error persisted.
(When changing the version, the call does not work, no matter if the quantity is there or not).
If the query runs successfully in a different API client like GraphiQL or Postman, it may be an issue with how you are making the request.
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog