productCategory deprecated, but no category field on Product

As you can see here https://shopify.dev/docs/api/admin-graphql/2024-01/objects/Product#field-product-productcategory the field productCategory seems to be deprecated on products, and it says that you should use the ‘category’ instead. However, there is no ‘category’ field on Product. I’d like to ask how to handle this.

Thanks!

2 Likes

The Category field is available in 2024-04
https://shopify.dev/docs/api/admin-graphql/2024-04/objects/Product

1 Like

There is no field productCategory or category in Product****Input. How can I add/attach productCategory to a Product in productCreate mutation?
I’m using 2024-04 version of graphql.
ProducInput model:
https://shopify.dev/docs/api/admin-graphql/2023-10/input-objects/productinput

1 Like

Did you try https://shopify.dev/docs/api/admin-graphql/2024-04/input-objects/ProductCategoryInput ?

It was available until some days ago. Now there is no field exists of productCategory in ProductInput

1 Like

Has anyone found a good solution for this? I was able to change the category by using the unstable API version.