Open
Conversation
The webhook has the correct object ID, but the schema (and even the underlying data) is in a different format. This uses the API object as the source of truth, by fetching it fresh when a webhook arrives.
This is a bit of housekeeping, and a bit of soul-searching. I had a heck of a time reasoning about when and why Shopify was producing errors, so I figured it was worth expressing the variety of message structures that we may get back from the API. - Network/connection or "client" errors, in Guzzle-land (not specific to Shopify) are caught and re-thrown with a generic message. - API consumers (things that call `Api::query()` can basically catch a single kind of error and decide what to do - Those queries no longer have to worry about unpacking and handling various response structures (like `userErrors`), or the root element in each response named the same as the original query or procedure. - We now throw on any session issue before querying, rather than relying on individual consumers. - We no longer throw on “empty” or missing `data` keys in responses (they're just returned verbatim, and it's up to the consumer to decide whether that’s “bad”) - If you really need to perform a low-level, unopinionated query, use `Api::getGqlClient()` directly. - Webhook setup and messaging has been improved - Filter webhooks by environment/URI at the API level, rather than in the controller - Simplified how we detect and repair "missing" webhook topic subscriptions - We now use a template and natural form requests and success/failure response handlers for the webhook management view - Moved away from deprecated `endpoint` and `callbackUrl` fields when creating and fetching webhooks, in favor of the plain `uri` field - Bulk operation handling is no longer concerned with API response structure, errors, etc. (per above) - For stores that use bulk GQL *mutations*, we now look for specifically bulk *query* operations (one mutation and one query can run in parallel) - ?!?!
…ooks This was made easier with the introduction of GIDs (`admin_graphql_api_id`) in most/all webhooks.
Howdy, stranger! If you're reading this and would like to start a support group for Shopify developers, let me know… they have it pretty rough.
| $this->getView()->registerJs($js); | ||
| } | ||
|
|
||
| return $this->asCpScreen() |
Contributor
There was a problem hiding this comment.
Bless. I extracted this mostly to fiddle with some connection and API stuff, knowing it was a regression in a number of ways! That might have been the first time I used a literal onclick attribute. 😭
Contributor
Author
There was a problem hiding this comment.
I am not entirely happy with this solution I went with if I am honest.
Would rather the "x" be an actual button to save messing around. But want to keep that consistency similar to sections and fields tables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.