[Shopify] Uptake Admin GraphQL API to version 2026-07#9221
Open
onbuyuka wants to merge 6 commits into
Open
Conversation
Bump the pinned Shopify Admin API version from 2026-01 to 2026-07 (two hops, 2026-04 + 2026-07) and update the doc references. No query rewrites are required. The largest breaking change in the window - the inventory compare-and-swap changeFromQuantity plus mandatory @idempotent directive that became required in 2026-04 - was already implemented during the 2026-01 uptake. Every other 2026-04 / 2026-07 breaking change either does not touch the connector GraphQL surface or was already handled in a prior uptake. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Copilot PR ReviewIteration 6 · Outcome: completed Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630 Findings by domainFindings split into Knowledge-backed (cite a BCQuality article) and Agent (the agent's own judgement, no matching BCQuality rule).
Totals: 1 knowledge-backed · 0 agent findings. Orchestrator pre-filter (13 file(s) excluded)
Findings produced by the Copilot CLI agent against BCQuality at |
… shipping Shopify is deprecating the merchant-owned deliveryProfile(s) APIs for shops that move to market-driven shipping (rollout Oct 2026, all merchants by Jul 2027). For those shops the legacy deliveryProfiles query returns stale/incomplete data, so shipping-method discovery silently breaks. ShpfyShippingMethods now detects the model via ShopFeatures.marketDrivenShipping and, when enabled, reads active shipping option names from markets -> delivery.shipping.optionDefinitions (readers Option B of Shopify's upgrade guide). Legacy shops keep using deliveryProfiles unchanged. The read_markets scope is already requested by the connector. Adds two GraphQL resources (GetMarketShippingMethods / GetNextMarketShippingMethods), two GraphQLType enum values, and a test covering the market-driven path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
DeliveryCarrierCalculatedOptionDefinition has no `name` field - its rates are named by the carrier at checkout - so selecting `name` on that inline fragment returned an `undefinedField` GraphQL error. Only the flat-rate, value-based and weight-based option types expose `name`; carrier-calculated nodes now yield an empty name and are skipped by the existing name check. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The rate limiter reserves throttle budget from the `# cost` line before sending. Shopify reports requestedQueryCost 74 for the markets shipping-option query (markets first:25 x optionDefinitions first:50), so the previous estimate of 40 under-reserved and could trigger throttling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Guard the markets pagination loop against a non-terminating case: if the Markets API returns hasNextPage=true with an empty edges array, the cursor was never advanced and the same query would be re-issued forever. Exit as soon as edges is empty - there is no cursor to advance - which also guarantees the cursor update always runs on an initialized node. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ts responses The HttpClientHandler cannot read the request body, so use the standard Library - Variable Storage queue to return responses in call order: the feature-detection query first, then the markets query. The combined mock is split into MarketDrivenShippingFeatureResponse.txt and MarketShippingMethodsResponse.txt, and the test asserts the queue is drained. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nikolakukrika
approved these changes
Jul 9, 2026
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.
Uptakes the Shopify Admin GraphQL API from 2026-01 to 2026-07 (two hops: 2026-04 + 2026-07) and handles the one 2026-07 deprecation that would otherwise silently break merchants: market-driven shipping.
1. Version bump
ShpfyCommunicationMgt.Codeunit.al(VersionTok) from2026-01to2026-07, and updated the doc references.A full review of the 2026-04 and 2026-07 Admin GraphQL / Webhook changelog entries (76 relevant entries) found no other required query changes: the largest breaking change - inventory compare-and-swap
changeFromQuantity+ mandatory@idempotent(required in 2026-04) - was already implemented during the 2026-01 uptake, and every other breaking change either does not touch the connector surface or was already handled.2. Market-driven shipping reader (Shopify upgrade guide, readers Option B)
Shopify is deprecating the merchant-owned
deliveryProfile(s)APIs for shops that move to market-driven shipping (rollout Oct 1 2026; all merchants by Jul 1 2027). For those shops the legacydeliveryProfilesquery the connector uses to discover shipping-method names returns stale/incomplete data, silently breaking theShpfy Shipment Method Mapping.ShpfyShippingMethodsnow detects the model viaShopFeatures.marketDrivenShipping.markets -> delivery.shipping.optionDefinitions(inline fragments for the concrete option types).deliveryProfilespath.read_marketsscope is already requested by the connector - no scope change needed.GetMarketShippingMethods/GetNextMarketShippingMethodsresources, twoShpfy GraphQL Typeenum values, and a test covering the market-driven path.Validation
MockAzureKeyVaultSecretProviderin the untouchedShpfyTestShopify.Codeunit.al); CI compiles the test project properly.Fixes AB#625461