Use new parameters for app management create mutations
WHY are these changes introduced?
Part 2 of https://github.com/Shopify/develop-app-foundations/issues/1050
This PR adapts to changes in the. App Management API introduced in part 1 of the sequence of PRs.
WHAT is this pull request doing?
The new AppVersionInput graphql type is used in the App Management client as a variable for in the app/version create mutations.
On deploy, if a bundle has been uploaded, only that bundle URL is specified as sourceUrl in AppVersionInput. That means that the bundle's manifest is the sole source of app module information like config, etc.
If no bundle has been uploaded, then name and app module information is passed in the source field of AppVersionInput, similar to existing (now-deprecated) API.
It doesn't appear that there are existing tests to cover the deploy logic in the app management client, so I added a few new ones to test deploys and this PR in particular.
How to test your changes?
Running app deploy for a new app will exercise all of the changes in this PR. Note that there is currently an unrelated issue where an app's initial deploy will fail at the CLI level because of a switch to using the partners client for some reason. In this case, the app and initial version are still created correctly.
Testing can be run against production once part 1 has deployed, or against a spin instance running that PR's branch.
Measuring impact
How do we know this change was effective? Please choose one:
- [x] 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
- [x] I've considered possible cross-platform impacts (Mac, Linux, Windows)
- [x] I've considered possible documentation changes
Thanks for your contribution!
Depending on what you are working on, you may want to request a review from a Shopify team:
- Themes: @shopify/advanced-edits
- UI extensions: @shopify/ui-extensions-cli
- Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
- Hydrogen: @shopify/hydrogen
- Other: @shopify/app-inner-loop
Coverage report
St.:grey_question: |
Category | Percentage | Covered / Total |
|---|---|---|---|
| π‘ | Statements | 73.28% (+0.19% πΌ) |
8432/11507 |
| π‘ | Branches | 69.79% (+0.2% πΌ) |
4112/5892 |
| π‘ | Functions | 72.04% (+0.17% πΌ) |
2190/3040 |
| π‘ | Lines | 73.62% (+0.19% πΌ) |
7978/10837 |
Show files with reduced coverage π»
St.:grey_question: |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| π‘ | ... / output.ts |
77.39% (-0.19% π») |
76.19% (+0.81% πΌ) |
63.64% | 77.06% (-0.21% π») |
Test suite run success
1898 tests passing in 861 suites.
Report generated by π§ͺjest coverage report action from b40cdf66861f64322c88ee3c94f22bfc44a972bd
We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** 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.
This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. β If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.