Skip to content

Add typed JSON output to store execution - #8567

Merged
gonzaloriestra merged 1 commit into
gonzalo/json-store-openfrom
gonzalo/json-store-execution
Sep 21, 2026
Merged

gonzaloriestra merged 1 commit into
gonzalo/json-store-openfrom
gonzalo/json-store-execution

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Fixes shop/issues-develop#23689.

Scripts need a discoverable result contract for store execute without constraining caller-defined GraphQL fields.

WHAT is this pull request doing?

Adds a shared inferred result type from transport to presenter and validates JSON encoding. Preserves arbitrary response fields, property order, nulls, omissions, file contents, and output channels. Stacked on #8566.

Example output

Illustrative sample data. Text excerpts omit terminal decoration and progress. JSON blocks show the final stdout result; progress and diagnostics go to stderr.

shopify store execute --store shop.myshopify.com --query 'query { shop { name } }'

Text

Operation succeeded.

{
  "shop": {
    "name": "My Shop"
  }
}

JSON (--json)

{
  "shop": {
    "name": "My Shop"
  }
}

With --json --output-file result.json, the query result is written to the file and stdout is empty. Progress and diagnostics remain on stderr.

How to manually test your changes?

shopify store execute --store shop.myshopify.com --query 'query { shop { name } }'
shopify store execute --store shop.myshopify.com --query 'query { shop { name } }' --json
shopify store execute --store shop.myshopify.com --query 'query { shop { name } }' --json --output-file result.json
shopify store execute --json-schema

Checklist

@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Sep 16, 2026
@gonzaloriestra
gonzaloriestra added this pull request to stack #8564 September 16, 2026 15:00
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-execution branch from fb7cc2a to d2aee19 Compare September 16, 2026 15:02
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-execution branch from d2aee19 to 3fe0d68 Compare September 17, 2026 12:06
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-execution branch from 3fe0d68 to 2eace70 Compare September 17, 2026 13:35
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-execution branch from 2eace70 to 5e3ce69 Compare September 17, 2026 13:37
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-execution branch from 5e3ce69 to 5a5ad2e Compare September 17, 2026 14:19
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-execution branch 2 times, most recently from 439751d to 1f57c61 Compare September 17, 2026 14:38
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-execution branch from 1f57c61 to 15f3986 Compare September 18, 2026 09:51
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-execution branch from 15f3986 to 94d8ee0 Compare September 18, 2026 10:09
@gonzaloriestra
gonzaloriestra marked this pull request as ready for review September 18, 2026 11:09
@gonzaloriestra
gonzaloriestra requested review from a team as code owners September 18, 2026 11:09
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-execution branch from 94d8ee0 to 1648837 Compare September 18, 2026 11:15
@github-actions github-actions Bot added no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. and removed Area: @shopify/cli @shopify/cli package issues labels Sep 18, 2026
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-execution branch from 1648837 to 8bd6821 Compare September 18, 2026 11:44

@dmerand dmerand left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a funny one, adding a schema that's "any object". It makes me wonder about this command... but that's a separate concern. Changes LGTM!

@gonzaloriestra
gonzaloriestra added this pull request to the merge queue Sep 21, 2026
An error occurred while trying to automatically change base from gonzalo/json-store-open to gonzalo/json-store-authentication September 21, 2026 17:12
Merged via the queue into main with commit c90cc10 Sep 21, 2026
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants