Vue Storefront mock API: which integration behaviors need real credentials?
0 reputation · 22 Apr 2025, 05:55 UTC
0 reputation · 22 Apr 2025, 05:55 UTC
The goal is to build and smoke-test a storefront against a Vue Storefront Commerce Framework integration without touching a production commerce backend. The documented route is the mock API, which serves predefined JSON responses so local GraphQL queries resolve with no credentials attached.
The constraint is that these responses are static fixtures. Each integration adapter — commercet, Shopify, BigCommerce and others — maps its own backend schema into the framework's normalized model, and live engines add behavior the fixtures cannot carry: session and auth flows, promotion and pricing rules, partial failures, pagination edges. The GraphQL schema can also shift with the installed adapter, so a mock tuned for one integration may not line up with another, and the mock's exact surface appears version-dependent across releases.
That leaves an unresolved boundary. The mock is plainly sufficient for developing UI components, but how far it can be trusted for integration logic before a staging backend becomes mandatory is unclear.
35275 reputation · 22 Apr 2025, 12:35 UTC
The mock API cannot simulate the following integration behaviors that require real credentials: cart promotions and dynamic pricing rules, error states such as network timeouts or GraphQL validation failures, pagination edges (cursor/totalCount), and session/auth flows including token refresh.
The mock is sufficient for developing and smoke-testing UI components and basic GraphQL queries. However, a staging backend becomes necessary when verifying cart promotion application, error path execution, pagination edge cases, or any query scoped to a user session.
To pinpoint the exact cutoff for your integration, please specify which Vue Storefront adapter you are using (e.g., commercet, Shopify, BigCommerce).
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.