-
Notifications
You must be signed in to change notification settings - Fork 219
shopify app import-custom-data-definitions #6658
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
base: shauns/dcdd-import-service
Are you sure you want to change the base?
shopify app import-custom-data-definitions #6658
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
240c3d5 to
37bd585
Compare
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success3489 tests passing in 1402 suites. Report generated by 🧪jest coverage report action from ee3bfb6 |
|
/snapit |
|
🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm. Test the snapshot by installing your package globally: npm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20251126113029Caution After installing, validate the version by running just |
gonzaloriestra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code LGTM and it works as expected, but I have some suggestions:
- The command is too slow because of the iteration through all the product types and the delays. Some ideas to make it faster:
- Get rid of the sleeps or reduce them
- Reduce the number of queries by skipping types with no access
- Run them concurrently
- Add a new API endpoint to fetch all of them in batch
- Why not updating the TOML directly instead of printing the changes? Most devs will have Git to check the changes. And we could add a
--dry-runflag to only print.
37bd585 to
f0a920f
Compare
bd265d7 to
ac99e52
Compare
f0a920f to
1a20071
Compare
1a20071 to
ee3bfb6
Compare
ac99e52 to
ae8cbbd
Compare
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/public/node/http.d.ts@@ -18,7 +18,7 @@ type AutomaticCancellationBehaviour = {
} | {
useAbortSignal: AbortSignal | (() => AbortSignal);
};
-type RequestBehaviour = NetworkRetryBehaviour & AutomaticCancellationBehaviour;
+export type RequestBehaviour = NetworkRetryBehaviour & AutomaticCancellationBehaviour;
export type RequestModeInput = PresetFetchBehaviour | RequestBehaviour;
/**
* Specify the behaviour of a network request.
packages/cli-kit/dist/public/node/api/graphql.d.ts@@ -47,6 +47,7 @@ export type GraphQLRequestDocOptions<TResult, TVariables> = GraphQLRequestBaseOp
}>>;
variables?: TVariables;
unauthorizedHandler?: UnauthorizedHandler;
+ autoRateLimitRestore?: boolean;
};
export interface GraphQLResponseOptions<T> {
handleErrors?: boolean;
|

WHY are these changes introduced?
Adds
shopify app import-custom-data-definitions, a command to automatically convert existing metafields and metaobjects to declarative TOML.WHAT is this pull request doing?
Exposes the service from the downstack PR. The command uses the dev store, so this follows the same patterns as
app dev.How to test your changes?
Run
shopify app import-custom-data-definitionson an app that has some app-reserved definitions in its dev store. If you want to make one via GraphQL, this example is good.The command has an
--include-existingoption. If this is set, definitions already in the TOML will be included too. That's a very fast way of testing/iterating.Measuring impact
How do we know this change was effective? Please choose one:
Checklist