saleor / saleor

Saleor Core: the high performance, composable, headless commerce API.
https://saleor.io
BSD 3-Clause "New" or "Revised" License
20.71k stars 5.48k forks source link

update product webhook - old data is being sent for channel_listings #9992

Open g-londhe opened 2 years ago

g-londhe commented 2 years ago

What I'm trying to achieve

Update the product from the saleor dashboard and catch the updated data in the webhook.

Steps to reproduce the problem

  1. Create a product from the dashboard or using graphql API. ( I created from both) Following are the steps to create a product. Create_product_query, Add_product_to_channel_listing, Update_product_variant_channel, Create_digital_content.

What I expected to happen

update_product should send the updated data while calling the webhook.

Screenshots and logs

System information

Saleor version:

Operating system:

timuric commented 2 years ago

@g-londhe dashboard is triggering several mutations on save, therefore there should be several webhook calls with different payloads.

g-londhe commented 2 years ago

@timuric none of those have new data for channel_listings, always values before save are received in web-hook.

manojLondhe commented 2 years ago

+1

Noticed that for channel_listings, always values before save are received in web-hook. New values are not received.

Need to save twice from admin dashboard to get new data.

manojLondhe commented 2 years ago

Noticed same for media as well.

If I add 2 images in product media from saleor-admin-dashboard, I get 1 in webhook. Next time in edit, if I add 3 images - in webhook I get 2 images.

Something is definitely weird here.

timuric commented 2 years ago

Thanks for reporting, we will dive in next week.

manojLondhe commented 2 years ago

@timuric any idea in which release this will be fixed?

manojLondhe commented 2 years ago

@timuric any idea in which release this will be fixed?

timuric commented 2 years ago

@patrys was this issue resolved?

patrys commented 2 years ago

I am confirming this with the QA team.

manojLondhe commented 2 years ago

This majorly affects everything built using external apps which heavily rely on webhooks.

timuric commented 2 years ago

@manojLondhe we were able to reproduce it and add it as a high priority