Skip to content

Add Business Platform-backed store list command#7708

Draft
dmerand wants to merge 3 commits into
mainfrom
donald/store-list-business-platform
Draft

Add Business Platform-backed store list command#7708
dmerand wants to merge 3 commits into
mainfrom
donald/store-list-business-platform

Conversation

@dmerand
Copy link
Copy Markdown
Contributor

@dmerand dmerand commented Jun 3, 2026

Summary

Add shopify store list as a Business Platform-backed command for the current Shopify CLI account.

Role in the reordered stack

PR Purpose
#7708 BP listing from main
#7709 local auth summary API
#7714 local source + auto fallback

The original stack landed local listing first. This stack flips the order because the BP path has cleaner ownership:

  • @shopify/store owns the command and BP store query
  • @shopify/organizations owns org discovery
  • @shopify/cli-kit owns auth/session mechanics

Landing BP first also avoids putting storage-shaped helpers in the parent PR.

Scope

  • add shopify store list under @shopify/store
  • add the BP org-scoped accessibleShops query and codegen under packages/store
  • extend @shopify/organizations with fetchOrganizationsWithAccessInfo() so callers can distinguish:
    • resolved current user + organizations
    • unresolved currentUserAccount
    • current user email for output
  • list stores org-by-org with partial success handling:
    • successful orgs still contribute results when some orgs fail
    • text output gets a warning
    • JSON output includes failedOrganizations
    • debug output keeps per-org failure details
  • discard malformed persisted CLI session JSON instead of crashing session readers

Review this PR as three concerns

  1. org discovery in @shopify/organizations
  2. per-org store listing + partial failure handling in @shopify/store
  3. defensive CLI session read hardening in @shopify/cli-kit

Intentionally not in this PR

  • local listing
  • --source local
  • BP→local fallback

Those land in #7709 and #7714.

Note on generated files

Local codegen also regenerated two unrelated admin GraphQL type files:

  • packages/app/src/cli/api/graphql/admin/generated/types.d.ts
  • packages/cli-kit/src/cli/api/graphql/admin/generated/types.d.ts

They stay in this branch because local codegen reproduces them and trimming them back out risks CI drift.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/cli @shopify/cli package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants