-
Notifications
You must be signed in to change notification settings - Fork 474
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
Extend webhook registration to support metafield_namespaces #1186
Extend webhook registration to support metafield_namespaces #1186
Conversation
I have signed the CLA! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there! Just wanted to say we totally see your PR and appreciate the thoughtful contribution. There are some changes that may affect how we deal with webhooks coming soon™️ and I'm also going to go through some of the other issues here first. All to say, we're going to have to come back to this one, thanks for you patience!
Hi @mllemango thank you for the update, even if it's no progress for now it's good to have that communicated. |
eb16086
to
a702464
Compare
Hi @mllemango how is the coming soon™️ coming? I've recently rebased this change (we still need this functionality) and I see #1189 was merged - are we likely to see any further updates soon? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience, since I havent heard anything please go ahead and do the necessary updates for CI to pass!
I've added the ability to specify metafield_namespaces in webhook registration to allow these to be received from apps using this API. This is mostly following the patterns already there for fields. Have updated: - docs, adding in mention of the new parameter as well as ensuring it's referenced if using `fields` as well - Updated the base Registration and child classes to have another keyword argument in the initializer - Extended the tests, there's more complexity now as before it was just a boolean "are fields present" - but happy to adjust as needed. - Changelog for this PR shopify_app will also need adjusting to pass through the `metafield_namespaces` parameter but I can create that PR if there's appetite from this one.
a702464
to
0761230
Compare
This is an extension on Shopify/shopify-api-ruby#1186, allowing users of the shopify_app ruby/rails library to register webhooks and expect them to return with metafields back.
This is an extension on Shopify/shopify-api-ruby#1186, allowing users of the shopify_app ruby/rails library to register webhooks and expect them to return with metafields back.
…1186) I've added the ability to specify metafield_namespaces in webhook registration to allow these to be received from apps using this API. This is mostly following the patterns already there for fields. Have updated: - docs, adding in mention of the new parameter as well as ensuring it's referenced if using `fields` as well - Updated the base Registration and child classes to have another keyword argument in the initializer - Extended the tests, there's more complexity now as before it was just a boolean "are fields present" - but happy to adjust as needed. - Changelog for this PR shopify_app will also need adjusting to pass through the `metafield_namespaces` parameter but I can create that PR if there's appetite from this one.
This is an extension on Shopify/shopify-api-ruby#1186, allowing users of the shopify_app ruby/rails library to register webhooks and expect them to return with metafields back.
I've added the ability to specify metafield_namespaces in webhook registration to allow these to be received from apps using this API. This is mostly following the patterns already there for fields.
The tests have gotten more complex, as before it was just fields or !fields, but I'm open to feedback (there; and anywhere in general).
This will also need minor updates in the shopify_app codebase to pass through the parameter.
Description
This change allows
ShopifyApp.configuration.webhooks
to set ametafield_namespaces
parameter and pass that through to webhook registration.This allows anyone using the
shopify_app
gem (once that's also improved) to have webhooks with metafields without needing to write custom code. The alternative is to manually register webhooks through graphql and manage it (removing all the benefits of the shopify_app features), or to update a webhook registered this way to add themetafieldNamespaces
manually.How has this been tested?
I have added automated tests around the areas I've changed, and included this branch in a shopify app I'm building which needs these features, and tested it through that as well for HTTP webhook registration. In more detail I:
ShopifyApp.configuration.webhooks
with the new param,Checklist: