Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mock.shop as a storeDomain #986

Merged
merged 9 commits into from
Jun 8, 2023
Merged

Support mock.shop as a storeDomain #986

merged 9 commits into from
Jun 8, 2023

Conversation

frandiox
Copy link
Contributor

@frandiox frandiox commented Jun 7, 2023

Builds on top of #985 , and is related to the new onboarding in #913

Tiny change to support mock.shop as a storeDomain. Any call to storefront.query(...) will hit the mock.shop instead of the storefront API.

Note that mock.shop doesn't work for every query. For example, it throws permission errors when trying to read customer information.

🎩 To test it, add PUBLIC_STORE_DOMAIN="mock.shop" to the .env file in demo-store template, and comment out the customer { ... } selection part of the CartFragment in root.tsx (not supported in mock.shop).

image

@frandiox frandiox requested a review from a team June 7, 2023 03:07
@github-actions

This comment has been minimized.

@benjaminsehl
Copy link
Member

@teddyhwang @darius-gai — the permission errors for customers, any thoughts on that? intentional? want to keep it?

@teddyhwang
Copy link

@teddyhwang @darius-gai — the permission errors for customers, any thoughts on that? intentional? want to keep it?

I don't recall but we might have just forgotten that scope. The only scope we were intentional about not adding was checkout mutations. feel free to add the scope and generate a new token!

Base automatically changed from fd-store-domain-protocol to 2023-04 June 8, 2023 06:35
@frandiox frandiox merged commit 3251523 into 2023-04 Jun 8, 2023
10 checks passed
@frandiox frandiox deleted the fd-mock-shop branch June 8, 2023 07:07
@frandiox frandiox mentioned this pull request Jun 8, 2023
23 tasks
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.

None yet

4 participants