Greetings,
I was doing some testings and executed a create product mutation through a GraphQL client. Then i wanted to delete said product but for some reason my delete mutations don’t work. I figured that maybe i should delete the warehouse_product before deleting the product itself but i get an error when trying to delete warehouse_product too.
If you could point out if I’m doing something wrong I’d be grateful.
Command:
mutation { product_delete( data: { sku: "TESTPRODUCT" } ) { request_id complexity } }
Result:
{ "errors": [ { "message": "Unexpected Error", "operation": "product_delete", "field": "product_delete", "request_id": "5dbff4e5f6499cc7647bf5e6", "code": 22 } ], "data": { "product_delete": null } }
Command:>
mutation { warehouse_product_delete( data: { sku: "TESTPRODUCT", warehouse_id: "V2FyZWhvdXNlOjUyMzA=" } ) { request_id complexity } }
Result:
{ "errors": [ { "message": "Unexpected Error", "operation": "warehouse_product_delete", "field": "warehouse_product_delete", "request_id": "5dbff2eb6366730c04c1ddbe", "code": 22 } ], "data": { "warehouse_product_delete": null } }
And the product DOES exist because if i try running the mutation i used to create i get a msg that a product with that sku already exists.
Command:
mutation { product_create( data: { name: "TESTPRODUCT" sku: "TESTPRODUCT" price: "23.00" warehouse_products: { warehouse_id: "V2FyZWhvdXNlOjUyMzA=" on_hand: 130 inventory_bin: "Bin A1" reserve_inventory: 0 replenishment_level: 1 reorder_level: 1 reorder_amount: 20 custom: false } value: "15.00" barcode: "2233443355chair" country_of_manufacture: "US" dimensions: { weight: "12", height: "25", width: "10", length: "25" } value_currency: "USD" kit: false kit_build: false no_air: false final_sale: false customs_value: "1.00" not_owned: true dropship: false } ) { request_id complexity product { id legacy_id account_id name sku price value barcode country_of_manufacture dimensions { weight height width length } tariff_code value_currency kit kit_build no_air final_sale customs_value customs_description not_owned dropship created_at } } }