refactor(shopify): hardcode Admin API version (OAuth-only config) - #543
Merged
Conversation
The connection form is already OAuth-only (empty StateSchema). Remove the last bit of user/deploy-facing config: the Admin API version is now fixed to DEFAULT_API_VERSION instead of being resolved from state.apiVersion or the SHOPIFY_API_VERSION env var. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
The Shopify connection form is already OAuth-only —
StateSchemawas reduced toz.object({})in #526, so there's no fillable domain/token/version field anymore (token comes from the OAuthAuthorizationheader).This PR removes the last piece of runtime-variable config: the Admin API version is now hardcoded to
DEFAULT_API_VERSION(2026-07) instead of being resolved fromstate.apiVersionor theSHOPIFY_API_VERSIONenv var.Changes
server/types/env.ts— dropapiVersionfromShopifyCredentials; update comment.server/lib/client.ts— remove thestate.apiVersion || SHOPIFY_API_VERSION || …resolution and theapiVersionfield onMeshRequestContext.state/ resolved creds;buildGraphqlUrlusesDEFAULT_API_VERSIONdirectly.server/lib/client.test.ts— drop theapiVersioncases/assertions.Notes
SHOPIFY_STORE_DOMAIN/SHOPIFY_ACCESS_TOKEN) and the legacy raw-token path — these aren't part of the connection schema and don't appear in the UI.🤖 Generated with Claude Code
Summary by cubic
Hardcodes the Shopify Admin API version to
DEFAULT_API_VERSION(2026-07) for the OAuth-only connection. Previously the version could be set via connection state or theSHOPIFY_API_VERSIONenv var; overrides are no longer supported to reduce config surface and prevent version drift.apiVersioninShopifyCredentials,MeshRequestContext.state, and downstream consumers; the GraphQL URL builder always usesDEFAULT_API_VERSION.SHOPIFY_API_VERSION; it has no effect.SHOPIFY_STORE_DOMAIN,SHOPIFY_ACCESS_TOKEN) remain.Written for commit 33ea311. Summary will update on new commits.