Skip to content

Add typed JSON output to store inspection - #8442

Merged
gonzaloriestra merged 4 commits into
gonzalo/json-store-creationfrom
gonzalo/json-store-inspection
Sep 21, 2026
Merged

gonzaloriestra merged 4 commits into
gonzalo/json-store-creationfrom
gonzalo/json-store-inspection

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Fixes shop/issues-develop#23688.

Scripts need discoverable JSON contracts for store inspection and listing.

WHAT is this pull request doing?

Defines and validates info and list results using shared store and organization schemas. Result types are inferred from the schemas while each command keeps its existing field names, optional fields, and terminal output.

The stack’s single minor changeset is included in #8585.

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 info --store shop.myshopify.com

Text

Store details
ID            gid://shopify/Shop/123
Display Name  My Shop
Subdomain     shop.myshopify.com
Organization  Acme
Type          Dev
Plan          Plus

Next steps
• Manage this store in the Shopify admin

JSON (--json)

{
  "id": "gid://shopify/Shop/123",
  "displayName": "My Shop",
  "subdomain": "shop.myshopify.com",
  "organizationId": "1234",
  "organizationName": "Acme",
  "type": "dev",
  "plan": "plus",
  "adminUrl": "https://admin.shopify.com/store/shop"
}

shopify store list --organization-id 1234

Text

Listing stores.

Organization  Acme (1234)

To list stores authenticated directly with shopify store auth, run shopify store auth list.

Subdomain  Name     Type  Plan  Created
shop       My Shop  Dev   Plus  Sep 18, 2026

JSON (--json)

{
  "stores": [
    {
      "id": "gid://shopify/Shop/123",
      "store": "shop.myshopify.com",
      "primaryDomain": "shop.myshopify.com",
      "createdAt": "2026-09-18T10:00:00Z",
      "organizationId": "1234",
      "organizationName": "Acme",
      "name": "My Shop",
      "type": "dev",
      "plan": "plus"
    }
  ],
  "organization": {
    "id": "1234",
    "name": "Acme"
  }
}

How to manually test your changes?

shopify store info --json-schema
shopify store list --json-schema
shopify store info --store shop.myshopify.com
shopify store info --store shop.myshopify.com --json
shopify store list --organization-id 1234
shopify store list --organization-id 1234 --json

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type and added a changeset.

@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-inspection branch 2 times, most recently from 030e413 to 5397b12 Compare August 31, 2026 13:00
@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 Aug 31, 2026
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-inspection branch from 5397b12 to 827e95c Compare August 31, 2026 13:39
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-inspection branch 2 times, most recently from 0b27fc5 to 78dbd57 Compare August 31, 2026 14:33
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-inspection branch from 78dbd57 to 2317512 Compare August 31, 2026 14:45
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-inspection branch from 2317512 to 4061a8a Compare August 31, 2026 14:57

@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 one is very cut + dry, just how I like it! I think we can remove this command from the linter allowlist now, as well (and should generally do that on all of these PRs).

@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-inspection branch from 4061a8a to ded6b5e Compare September 10, 2026 11:00
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-inspection branch from ded6b5e to ee54443 Compare September 10, 2026 11:13
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-inspection branch from 20cbc88 to 95bc7e5 Compare September 16, 2026 11:13
@gonzaloriestra
gonzaloriestra removed this pull request from stack #8440 September 16, 2026 11:16
@gonzaloriestra
gonzaloriestra added this pull request to stack #8564 September 16, 2026 11:17
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-inspection branch from 95bc7e5 to 20cbc88 Compare September 16, 2026 15:02
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-inspection branch 2 times, most recently from b6b1b5c to c3fdf53 Compare September 17, 2026 14:19
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-inspection branch from c3fdf53 to affdf6a Compare September 17, 2026 14:35
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-inspection branch from affdf6a to 9f3fa71 Compare September 17, 2026 14:38
@gonzaloriestra
gonzaloriestra marked this pull request as ready for review September 17, 2026 15:03
@gonzaloriestra
gonzaloriestra requested review from a team as code owners September 17, 2026 15:03
Comment thread packages/store/src/cli/services/store/info/types.ts Outdated
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-inspection branch from 9f3fa71 to 5ce89fc Compare September 18, 2026 11:15
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-inspection branch from 5ce89fc to 2451c40 Compare September 18, 2026 11:44
@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-creation to main September 21, 2026 17:11
Merged via the queue into main with commit ba970b4 Sep 21, 2026
27 of 31 checks passed
@gonzaloriestra
gonzaloriestra deleted the gonzalo/json-store-inspection branch September 21, 2026 17:12
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