Skip to content

Fix --handle flag on get commands, enrich product list/get output#30

Merged
c99e merged 1 commit intomainfrom
fix/cli-friction-minor-fixes
Mar 29, 2026
Merged

Fix --handle flag on get commands, enrich product list/get output#30
c99e merged 1 commit intomainfrom
fix/cli-friction-minor-fixes

Conversation

@c99e
Copy link
Copy Markdown
Owner

@c99e c99e commented Mar 29, 2026

Changes

Bug fix: --handle flag on get commands (SAU-234)

All get commands (product, page, collection, menu) now produce a clear error when --handle is passed without a positional argument, instead of silently ignoring the flag.

Before: shopq page get --handle about-us → generic "Usage" error
After: shopq page get --handle about-us → "--handle is not a flag for this command. Pass the identifier as a positional argument: shopq page get "

Extracted shared rejectHandleFlag() helper to avoid duplicating the check across 4 commands.

Enrich product list output

  • Added Category column (taxonomy name, or empty if unset)
  • Added Image column (Yes/No based on featuredImage)
  • GraphQL query now fetches category { id name } and featuredImage { url }

Enrich product get output

  • Added Category section showing taxonomy name
  • Added Metafields section showing namespace.key and value for all metafields
  • GraphQL query now fetches category { id name } and metafields(first: 25)

Docs

  • Added friction logs (FRICTION.md, CLI_FRICTION.md) for reference
  • Added architecture spec (docs/gql-first-refactor.md) for planned gql-first refactor

Tests

321 tests pass (8 new tests added for the above changes).

@c99e c99e force-pushed the fix/cli-friction-minor-fixes branch from 02fea36 to 8d3945f Compare March 29, 2026 08:30
…list/get output

- All get commands (product, page, collection, menu) now produce a clear
  error when --handle is passed without a positional argument, instead of
  silently ignoring the flag.

- Extract rejectHandleFlag() helper to avoid duplicating the check.

- product list: add Category column and Image (Yes/No) indicator.
  GraphQL query now fetches category { id name } and featuredImage { url }.

- product get: add Category and Metafields sections to table and JSON output.
  GraphQL query now fetches category { id name } and metafields(first: 25).

- Add friction log docs (FRICTION.md, CLI_FRICTION.md) and architecture
  spec (docs/gql-first-refactor.md) for future reference.

Fixes SAU-234
@c99e c99e force-pushed the fix/cli-friction-minor-fixes branch from 8d3945f to 120193f Compare March 29, 2026 08:41
@c99e c99e merged commit d5f27f5 into main Mar 29, 2026
3 checks passed
@c99e c99e deleted the fix/cli-friction-minor-fixes branch March 29, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant