{"id":18459843,"url":"https://github.com/sayjava/mock-shopify","last_synced_at":"2025-04-23T18:13:01.955Z","repository":{"id":192351832,"uuid":"686554731","full_name":"sayjava/mock-shopify","owner":"sayjava","description":"The most straightforward and efficient method to create a Shopify E-Commerce Storefront without the need to connect to an actual Shopify store","archived":false,"fork":false,"pushed_at":"2023-09-06T06:44:17.000Z","size":105,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T18:12:45.188Z","etag":null,"topics":["fakerjs","hackathon","handlebars","mocking","shopify","storefront"],"latest_commit_sha":null,"homepage":"https://faker-server.dev/shopify","language":"Handlebars","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sayjava.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-03T07:17:27.000Z","updated_at":"2023-09-05T06:50:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"716718ba-bc15-433f-a419-2c6a42dc9d61","html_url":"https://github.com/sayjava/mock-shopify","commit_stats":null,"previous_names":["sayjava/mock-shopify"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayjava%2Fmock-shopify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayjava%2Fmock-shopify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayjava%2Fmock-shopify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayjava%2Fmock-shopify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sayjava","download_url":"https://codeload.github.com/sayjava/mock-shopify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250487535,"owners_count":21438612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fakerjs","hackathon","handlebars","mocking","shopify","storefront"],"created_at":"2024-11-06T08:24:39.448Z","updated_at":"2025-04-23T18:13:01.936Z","avatar_url":"https://github.com/sayjava.png","language":"Handlebars","readme":"\u003ch1 align=\"center\"\u003e Mock Shopify Guide \u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\nThe most straightforward and efficient method to create a Shopify E-Commerce Storefront without the need to connect to an actual Shopify store\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://shopify.faker-server.dev/graphql\"\u003ehttps://shopify.faker-server.dev/graphql\u003c/a\u003e\n\u003c/p\u003e\n\n## Features\n\n- No Shopify Store required.\n- Simulate different `product`, `collection`, `cart`, `customer` and `search`\n  scenarios\n- Simulate blocks and articles\n- Simulate different product recommendation scenarios\n- Internationalization support\n- Customer authentication support\n\n\u003e [!IMPORTANT] Mock Shopify GraphQL API was built to the specification of the\n\u003e Version 2023-07 of the GraphQL API\n\n## Getting Started\n\nIt is very easy to get started with `Mock Shopify`. Just point your application\nto the mock Shopify GraphQL API endpoint and you are good to go. Below are some\nexamples of how to get started with `Mock Shopify` using different frameworks.\n\n- [Shopify Hydrogen Guide](/hydrogen.md)\n- [NextJS E-Commerce Guide](/nextjs.md)\n\n## Supported Shopify Operations\n\nThese are the currently supported operations. Operations that are not supported\nreturns an error.\n\n- [x] Shop\n- [x] Product(s)\n  - [x] Recommendations\n  - [x] Variants\n  - [x] Metafields\n- [x] Collection(s)\n- [x] Cart\n- [x] Checkout\n- [x] Search\n- [x] Predictive Search\n- [x] Customer\n  - [x] Customer Orders\n  - [x] Authentication\n  - [x] Password Reset\n  - [x] MailingAddress\n    - [x] Create\n    - [x] Updated\n    - [x] Delete\n- [x] Pages\n- [x] Blogs\n- [x] Articles\n- [ ] Payment(s) (Coming Soon)\n- [ ] Shipping Rates (Coming Soon)\n\n\u003e [!NOTE] If there are properties that are missing, bugs or useful operations,\n\u003e please raise an issue on this repo.\n\n## Local/Offline Setup\n\n```bash\ndocker run --rm -p 8080:8080 ghcr.io/sayjava/mock-shopify:0.2.0\n```\n\n## Documentation\n\n`Mock Shopify` uses the full graphql schema from the Shopify Storefront API.\nTherefore, all operations supported by the Shopify Storefront API are supported\nby `Mock Shopify`. For a full list of operations, please see the\n[Shopify Storefront API](https://shopify.dev/docs/api/storefront/2023-07).\n\n### Products\n\nFetch products using the Shopify product ID or product handle. This allows you\nto build out product UI components to reflect different product state.\n\n\u003e [!NOTE] The `Mock Shopify` product response will always return a product\n\u003e regardless of the product ID or handle.\n\n\u003e [!NOTE] The `Mock Shopify` product images are placeholders appropriately\n\u003e sized.\n\n#### Alternative Product Scenarios\n\n| Product Handle          | Description                                        |\n| ----------------------- | -------------------------------------------------- |\n| `out-of-stock-product`  | Simulates a product that is out of stock           |\n| `giftcard-product`      | Simulates a product that is a gift card            |\n| `subscription-product`  | Simulates a product that is a subscription product |\n| `not-found-product`     | Simulates a product that is not found              |\n| `no-metafields-product` | Simulates a product that has no metafields         |\n| `no-variants-product`   | Simulates a product that has no variants           |\n| `on-sale-product`       | Simulates a product that is on sale                |\n\nExample\n\nThe following query will return a product that is out of stock\n\n```graphql copy\nquery {\n  product(handle: \"out-of-stock-product\") {\n    availableForSale\n  }\n}\n```\n\n### Shop Examples\n\n- [Out of Stock Product](https://hydrogen-mock-shopify.faker-server.dev/products/out-of-stock-product)\n- [Gift Card Product](https://hydrogen-mock-shopify.faker-server.dev/products/giftcard-product)\n- [Not Found Product](https://hydrogen-mock-shopify.faker-server.dev/products/not-found-product)\n- [On Sale Product](https://hydrogen-mock-shopify.faker-server.dev/products/on-sale-product)\n\n### Product Recommendations\n\nProduct recommendations can be retrieved for a product using any product ID.\n`Mock Shopify` will return a simulated list of recommended products for any\ngiven product ID.\n\n#### Alternative Product Recommendation Scenario\n\n| Product Handle               | Description                                 |\n| ---------------------------- | ------------------------------------------- |\n| `no-recommendations-product` | Simulates a product that has no recommended |\n| products                     |                                             |\n\n### Collection(s)\n\n`Mock Shopify` allows developers to query collections by `id` or `handle`. This\nallows you to build out collection UI components to reflect different collection\nstate.\n\n\u003e [!NOTE] The `Mock Shopify` collection response will always return a collection\n\n#### Alternative Collection Scenarios\n\n| Handle                 | Description                              |\n| ---------------------- | ---------------------------------------- |\n| `not-found-collection` | Simulates an unknown collection          |\n| `no-items-collection`  | Simulates a an empty list of collections |\n\n#### Collection Filters\n\n`Mock Shopify` supports collection filters. The following filters are supported:\n\n| Filter             | Description                                               | Type          |\n| ------------------ | --------------------------------------------------------- | ------------- |\n| `Product Type`     | Simulates different product types filters                 | `LIST`        |\n| `Vendor`           | Simulates multiple vendors filter                         | `LIST`        |\n| `Price`            | Simulates the price ranges for a collection               | `PRICE_RANGE` |\n| `Product Material` | Simulates product materials filter                        | `LIST`        |\n| `Availability`     | Simulates product availability filter                     | `LIST`        |\n| `Sort By`          | Simulates sorting order of the products in the collection | `LIST`        |\n| `Color`            | Simulates sorting order of the collection                 | `LIST`        |\n\n### Cart\n\nAny `cart id` will always return a cart. This allows developers to build out\ncart UI components to reflect different cart state.\n\nThe number of items in the cart is determined by the `first` query argument of\nthe `cart.lines` query.\n\nThe below query will return the 2 items in the cart\n\n```graphql copy\nquery {\n  cart(id: \"cart-id\") {\n    lines(first: 2) {\n      edges {\n        node {\n          id\n          quantity\n        }\n      }\n    }\n  }\n}\n```\n\nThe following mutation cart operations are supported by `Mock Shopify`:\n\n- `cartCreate`\n- `cartLinesAdd`\n- `cartLinesUpdate`\n- `cartLinesRemove`\n- `cartAttributesUpdate`\n- `cartDiscountCodesUpdate`\n- `cartPaymentUpdate`\n- `cartSubmitForCompletion`\n\n\u003e [!IMPORTANT] Please not that `Mock Shopify` does not keep any state, therefore\n\u003e any changes made to a cart will not persist. The basic operations will succeed\n\u003e but the cart will not be updated.\n\n#### Alternative Cart Scenarios\n\n| Cart ID           | Description                                  |\n| ----------------- | -------------------------------------------- |\n| `empty-cart`      | Simulates a cart that is empty               |\n| `discounted-cart` | Simulates a cart with applied discount codes |\n\n\u003e [!NOTE] See the\n\u003e [Shopify Storefront API](https://shopify.dev/docs/api/storefront/2023-07/queries/cart)\n\u003e for more information on the cart mutation operations, arguments,return types\n\u003e and error values.\n\n### Search\n\n`Mock Shopify` supports product searches using all the arguments supported by\nthe Shopify Storefront API.\n\n#### Alternative Search Scenarios\n\n| Query        | Description                                |\n| ------------ | ------------------------------------------ |\n| `no-results` | Simulates a search that returns no results |\n\n### Predictive Search\n\nThe predictive search is limited to returning `Products` and `Collections`. The\npredictive search will return a list of products and collections regardless of\nthe search term. It will also return some random search suggestions queries\nperfect for build out UIs.\n\n#### Alternative Predictive Search Control headers\n\n| Header       | Description                                           |\n| ------------ | ----------------------------------------------------- |\n| `no-results` | Simulates a predictive search that returns no results |\n\n### Customer\n\n`Mock Shopify` supports a few common customer operations\n\n- Create Customer\n- Authentication\n- Password Reset\n- Customer Orders\n- MailingAddress\n  - Create\n  - Updated\n  - Delete\n\n### Shop Example\n\n\u003e [!NOTE] Any email and password combination will work for authentication. The\n\u003e site does not keep any state.\n\n- [Customer Login](https://hydrogen-mock-shopify.faker-server.dev/login)\n- [Customer Orders](https://hydrogen-mock-shopify.faker-server.dev/account/orders)\n- [Customer Orders](https://hydrogen-mock-shopify.faker-server.dev/account/profile)\n\n#### Alternative Customer Scenarios\n\nWhen testing customer journeys, a couple of alternative journeys are available\nusing special values as listed below in this table\n\n| Header                   | Description                                                                            |\n| ------------------------ | -------------------------------------------------------------------------------------- |\n| `wrong-user@example.com` | If this specific email is supplied then the server will return an authentication error |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayjava%2Fmock-shopify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsayjava%2Fmock-shopify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayjava%2Fmock-shopify/lists"}