Add/enforce --json and output boundary for store commands#7190
Open
dmerand wants to merge 1 commit intodlm-store-restructurefrom
Open
Add/enforce --json and output boundary for store commands#7190dmerand wants to merge 1 commit intodlm-store-restructurefrom
dmerand wants to merge 1 commit intodlm-store-restructurefrom
Conversation
Contributor
Author
|
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. |
This was referenced Apr 3, 2026
179bc33 to
834d827
Compare
Contributor
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
b8cace6 to
2259cc1
Compare
834d827 to
3ea6614
Compare
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
Add
--jsontoshopify store authandshopify store execute.This makes the final command contract object-first: the structured result is canonical, and human-readable output is derived from that same result.
Why
shopify store *commands are intended to work well for agents and scripts as well as humans.The lower PRs make the auth and execute domain boundaries clearer, but the top-of-stack command contract still needed a JSON path for final results. This PR adds that path without changing the default human-readable behavior.
How
--jsontoshopify store auth--jsontoshopify store executeauthenticateStoreWithApp(...)return a structured auth result and route final display through an auth presenterexecuteStoreOperation(...)return the GraphQL result instead of owning final outputwriteOrOutputStoreExecuteResult(...)outputFilefrom the prepared execute request so request parsing stays separate from output policyHigh-level flow after this PR:
sequenceDiagram participant Command participant Service participant Result as Canonical result participant Renderer as Text/JSON renderer participant Stdout participant Stderr Command->>Service: run operation Service-->>Command: structured result Command->>Renderer: render(result, format) alt format = json Renderer->>Stdout: final structured result else format = text Renderer->>Stderr: human-readable summary endOut of scope here:
shopify store auth infoshopify store auth logoutThose commands are still experimental and are intentionally left out of this PR.
Testing
Manual checks:
pnpm run shopify store auth --store donaldmerand.myshopify.com --scopes read_products --json pnpm run shopify store execute --store donaldmerand.myshopify.com --query 'query { shop { name id } }' --json pnpm run shopify store auth --help pnpm run shopify store execute --helpVerify that:
--jsonis listed in help for both commandsstore auth --jsonprints only the final auth result to stdoutstore execute --jsonprints only the GraphQL result to stdout--output-filestill writes the JSON result without a human success banner in JSON modeConsidered
dlm-store-jsonshape directly: rejected; this PR is rebuilt on top of the cleaned auth/execute seams.store auth info/logout: out of scope while those commands are still experimental.Measuring impact
Checklist