Skip to content

feat: replace mock.shop domain with mockdotshop.myshopify.com internally#3710

Open
fredericoo wants to merge 4 commits intomainfrom
fb-mock-shop-migration
Open

feat: replace mock.shop domain with mockdotshop.myshopify.com internally#3710
fredericoo wants to merge 4 commits intomainfrom
fb-mock-shop-migration

Conversation

@fredericoo
Copy link
Copy Markdown
Contributor

@fredericoo fredericoo commented Apr 13, 2026

Why

The mock.shop domain is being deprecated. Newly scaffolded Hydrogen projects need to default to mockdotshop.myshopify.com as the demo Storefront API endpoint.

What

Replaces all default references to mock.shop with mockdotshop.myshopify.com across the runtime libraries, CLI tooling, and test infrastructure. Existing projects using mock.shop in their env vars continue to work — isMockShop() recognizes both domains during the transition.

Area Change
hydrogen-react storefront client New MOCK_SHOP_DOMAIN constant
CLI (dev-shared, init, onboarding) Updated detection, flag descriptions, and prompt labels to say "Mock Shop"
hydrogen analytics + virtual routes Updated fallback checkout domain and welcome page detection
E2E / test fixtures Updated env values and test URLs

How to Test

  1. Install and build
  2. Run dev script — GraphQL queries should target mockdotshop.myshopify.com (needs to add a log into a loader/action that calls the SFAPI)
  3. Verify the welcome/setup page still shows for mock shop products etc

Post-Merge Steps

  • Coordinate with the team deprecating the mock.shop domain on timing

@shopify
Copy link
Copy Markdown
Contributor

shopify bot commented Apr 13, 2026

Oxygen deployed a preview of your fb-mock-shop-migration branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment April 15, 202611:25 AM

Learn more about Hydrogen's GitHub integration.

@fredericoo fredericoo changed the title feat: replace deprecated mock.shop domain with mockdotshop.myshopify.com feat: replace mock.shop domain with mockdotshop.myshopify.com internally Apr 14, 2026
@fredericoo fredericoo marked this pull request as ready for review April 14, 2026 16:23
@fredericoo fredericoo requested a review from a team as a code owner April 14, 2026 16:23
},
"mock-shop": {
"description": "Use mock.shop as the data source for the storefront.",
"description": "Use Mock Shop as the data source for the storefront.",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I opted to replace the literal domain mentioned here to the term "Mock Shop" instead.

We do not need to surface to users that it comes from mockdotshop.myshopify.com

fredericoo and others added 4 commits April 15, 2026 12:23
The `mock.shop` domain is being deprecated. This migrates all default
references to `mockdotshop.myshopify.com` while maintaining backwards
compatibility for existing projects that still use `mock.shop` in their
environment variables.

Key decisions:
- `isMockShop()` checks recognize both old and new domains during the
  transition period, so existing storefronts don't break
- User-facing strings now display "Mock Shop" as a brand name rather
  than showing the raw domain
- Magic string literals replaced with named constants
  (`MOCK_SHOP_DOMAIN`, `LEGACY_MOCK_SHOP_DOMAIN`) in both hydrogen-react
  and the CLI

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The `mock.shop` domain is an internal default, not a user-facing API
contract. Both domains point to the same store, so existing projects
with `mock.shop` in their `.env` still work at the API level — they
just won't be detected as "mock shop" for cosmetic behaviors like the
welcome page and warning suppression, which is a useful nudge to update.

A clean cut is simpler than carrying a legacy constant that would need
a second breaking change to remove later.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The success banner snapshot expected "Mock.shop" but we changed the
storefront title to "Mock Shop" in onboarding/local.ts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@fredericoo fredericoo force-pushed the fb-mock-shop-migration branch from fff1d61 to cbe74e4 Compare April 15, 2026 11:23
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