Skip to content

Add support for api_version property in app toml access.admin module #5994

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alfonso-noriega
Copy link
Contributor

@alfonso-noriega alfonso-noriega commented Jun 17, 2025

WHY are these changes introduced?

To support specifying an admin API version in the app configuration.

WHAT is this pull request doing?

Adds an optional admin_api_version field to the app configuration schema, allowing developers to specify which version of the Admin API their direct api requests should use.

How to test your changes?

  1. Create an app configuration file with the admin_api_version field specified
  2. Verify that the configuration is properly validated
  3. Ensure the specified API version is used when making Admin API requests

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.18% (+0.01% 🔼)
12496/15984
🟡 Branches
72.35% (+0.05% 🔼)
6077/8399
🟡 Functions 78.38% 3266/4167
🟡 Lines
78.61% (+0.01% 🔼)
11824/15041

Test suite run success

2884 tests passing in 1254 suites.

Report generated by 🧪jest coverage report action from ee774bf

Copy link
Contributor Author

/snapit

Copy link
Contributor

🫰✨ Thanks @alfonso-noriega! Your snapshot has been published to npm.

Test the snapshot by installing your package globally:

pnpm i -g @shopify/cli@0.0.0-snapshot-20250619120839

Tip

If you get an ETARGET error, install it with NPM and the flag --@shopify:registry=https://registry.npmjs.org

Caution

After installing, validate the version by running just shopify in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@billfienberg
Copy link
Contributor

Related world PR: https://github.com/shop/world/pull/66071

@alfonso-noriega alfonso-noriega marked this pull request as ready for review July 2, 2025 15:47
@alfonso-noriega alfonso-noriega requested a review from a team as a code owner July 2, 2025 15:47
Copy link
Contributor

github-actions bot commented Jul 2, 2025

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

@@ -11,6 +11,7 @@ const AppAccessSchema = BaseSchema.extend({
.object({
direct_api_mode: zod.union([zod.literal('online'), zod.literal('offline')]).optional(),
embedded_app_direct_api_access: zod.boolean().optional(),
admin_api_version: zod.string().optional(),
})
.optional(),
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Re: line +44]

I think you also need to do add it here so that the value is sent in the config during deploy 🤔

See this comment inline on Graphite.

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

Successfully merging this pull request may close these issues.

3 participants