Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShopifyAPI::Webhooks::Registry doesn't update webhooks if metafield_namespaces has changed #1323

Open
fmichaut-diff opened this issue Jun 11, 2024 · 1 comment

Comments

@fmichaut-diff
Copy link

Overview/summary

ShopifyAPI::Webhooks::Registry#webhook_registration_needed? only checks that the address of the webhook is the same.
If anything else changed (metafield_namespaces, fields, private_metafield_namespaces, format) the webhook will be considered up to date and will be skipped.

The (Graphql and Rest) API supports update operations on Webhooks, so it should be trivial for the ShopifyAPI::Webhooks::Registry to implement updates for existing webhooks.

Basically the behaviour should be as follow :

  • No webhook existing for that address + topic ? -> create it
  • If webhook exist, check if other parameters (fields, metafields, ...) are up to date. If not -> update it
  • Otherwise all is good, we don't have to do anything
@lizkenyon
Copy link
Contributor

Hi there 👋

Thanks for flagging this!

I agree that this is an improvement that we should do. The team will look into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants