wp-graphql-woocommerce
wp-graphql-woocommerce copied to clipboard
Product mutations
Description
Mutations for manipulating Products
and ProductVariations
. Capability checks will be implemented so this mutations won't be usable for user without them.
Mutations
-
createProduct
- creates a product -
createVariation
- creates a product variation -
updateProduct
- modifies an existing product -
updateVariation
- modiifies an existing product variation -
deleteProduct
- deletes a product -
deleteVariation
- deletes a product variation
Hi @kidunot89, any updates on this? I'll develop a quick code for this mutation as I need it for my headless app. Maybe it could be useful.
@victormattosvm No progress has been made into this yet, it's been stalled due to other priorities and a lack of known interest/demand in this feature, and product querying still has some flaws and inconsistencies.
Introducing product mutations at this point could likely just add more bugs to the situation if those inconsistencies aren't resolved first, but I'll accept any solid PR with functionality.
@victormattosvm
Hi @kidunot89, any updates on this? I'll develop a quick code for this mutation as I need it for my headless app. Maybe it could be useful.
How is your code for mutation working for you? And care to share your code? or make PR to the main project?
I also need the ability to create products for one of my projects ..
hmm a temporary work-around, could be to use htlm2react to handle the creation and Modifications of Products https://www.npmjs.com/package/html-react-parser but i would rather use graphql directly.
Or could also use WooCommerce REST API just for the mutation of products function .. https://woocommerce.github.io/woocommerce-rest-api-docs/