Mock Shop API
Production-ready REST + GraphQL API that simulates an e-commerce backend. It is designed as a reference project to demonstrate modern Node.js architecture patterns: dual-transport APIs, DataLoader-based N+1 prevention, distributed tracing with OpenTelemetry, and edge-compatible databases.
REST API Doc https://mock-shop-api-fpwb.onrender.com/api-docs
GraphQL Playground https://mock-shop-api-fpwb.onrender.com/graphql
API REST
Section titled “API REST”RESTful endpoints with JSON responses, versioned by URI (for example, /v1/products). This makes it possible to evolve the API contract without breaking existing or future integrations.
REST API URL https://mock-shop-api-fpwb.onrender.com/v1
Full interactive documentation is available in Swagger.
Swagger / API Docs https://mock-shop-api-fpwb.onrender.com/api-docs
Key features
- URI-based versioning — all endpoints are grouped under
/v1/..., allowing you to adopt changes at your own pace. - Global rate limiting — 60 requests/minute per IP. Internal integrations can bypass this limit by sending a valid
X-API-Keyheader. - Swagger documentation — explore endpoints, request/response schemas, and error formats through an interactive UI without manual inspection.
GraphQL
Section titled “GraphQL”Single endpoint. Send POST requests with a JSON body containing your query. The GraphiQL playground and schema documentation are available at the same URL.
GraphQL Playground https://mock-shop-api-fpwb.onrender.com/graphql
Key features
- Code-first schema — generated directly from TypeScript decorators, keeping resolver logic and schema definitions continuously synchronized.
- N+1 prevention with DataLoader — request-scoped DataLoaders batch and cache relationship fetches, significantly reducing database round trips in nested queries.
- Depth protection — queries with more than 6 levels of nesting are automatically rejected to protect server resources.