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

how to use mock data such as json to test in local dev #264

Open
wanghaisheng opened this issue Jan 2, 2025 · 3 comments
Open

how to use mock data such as json to test in local dev #264

wanghaisheng opened this issue Jan 2, 2025 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@wanghaisheng
Copy link

No description provided.

@hta218 hta218 self-assigned this Jan 2, 2025
@hta218 hta218 added the question Further information is requested label Jan 2, 2025
@hta218
Copy link
Member

hta218 commented Jan 2, 2025

Hey @wanghaisheng, you can just use our env variables (in the .env.example file) to test for the real data from our demo store.

@wanghaisheng
Copy link
Author

I mean can i host a local json file act like a backend enpoint @hta218

@hta218
Copy link
Member

hta218 commented Jan 2, 2025

Hey @wanghaisheng, I want to clear this point here:
The Hydrogen Pilot theme data includes 2 source:

  1. The data from Shopify store (which comes through quering from Shopify using Graphql queries)
  2. The pages & global settings data from Weaverse Database

Which data source you can host as a local json file? Or both?
For (1): you can replace all storefront.query calls in all routes with your mock data
For (2): you can just go to Weaverse Studio, adding/updating components then save the page w/o the need to touch the code to test.

Did you clone the project to your local machine and try starting it up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants