Skip to content

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.


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.

Full interactive documentation is available in Swagger.

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-Key header.
  • Swagger documentation — explore endpoints, request/response schemas, and error formats through an interactive UI without manual inspection.

Single endpoint. Send POST requests with a JSON body containing your query. The GraphiQL playground and schema documentation are available at the same URL.

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.