[PR #5385] [MERGED] feat: add mock server #5182

Closed
opened 2026-03-17 02:39:17 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5385
Author: @anwarulislam
Created: 9/15/2025
Status: Merged
Merged: 10/8/2025
Merged by: @anwarulislam

Base: mock-serverHead: feat/mock-server


📝 Commits (10+)

  • 56f5289 feat: add MockServer model to support user-specific mock server configurations
  • 96f855e feat: implement mock server creation functionality and UI components
  • 8a93917 feat: add mock server management dashboard and edit functionality
  • 58ff351 feat: implement mock server functionality with controller, service, model, and GraphQL support
  • 80deb59 feat: remove mock server components and related files
  • b9b86e4 feat: add mock server management functionality with creation, update, and deletion support
  • 572b12d feat: implement mock server middleware and controller for subdomain-based routing
  • 520b5c3 fix: mock server middleware and service with improved request handling and detailed error responses
  • 463f554 fix: remove unused server icon import from Sidenav component
  • dab9a1f feat: add MockServerResolver to the GraphQL schema and update GetMockServer query to use String type for id

📊 Changes

28 files changed (+1829 additions, -67 deletions)

View changed files

📝 packages/hoppscotch-backend/prisma/schema.prisma (+84 -67)
📝 packages/hoppscotch-backend/src/app.module.ts (+2 -0)
📝 packages/hoppscotch-backend/src/errors.ts (+24 -0)
📝 packages/hoppscotch-backend/src/gql-schema.ts (+2 -0)
packages/hoppscotch-backend/src/mock-server/mock-server.controller.ts (+110 -0)
packages/hoppscotch-backend/src/mock-server/mock-server.middleware.ts (+102 -0)
packages/hoppscotch-backend/src/mock-server/mock-server.model.ts (+108 -0)
packages/hoppscotch-backend/src/mock-server/mock-server.module.ts (+18 -0)
packages/hoppscotch-backend/src/mock-server/mock-server.resolver.ts (+102 -0)
packages/hoppscotch-backend/src/mock-server/mock-server.service.ts (+384 -0)
📝 packages/hoppscotch-backend/src/pubsub/topicsDefs.ts (+3 -0)
📝 packages/hoppscotch-common/locales/en.json (+72 -0)
📝 packages/hoppscotch-common/src/components.d.ts (+5 -0)
📝 packages/hoppscotch-common/src/components/collections/Collection.vue (+17 -0)
📝 packages/hoppscotch-common/src/components/collections/MyCollections.vue (+14 -0)
📝 packages/hoppscotch-common/src/components/collections/index.vue (+18 -0)
packages/hoppscotch-common/src/components/mockServer/CreateMockServer.vue (+320 -0)
packages/hoppscotch-common/src/helpers/backend/gql/mutations/CreateMockServer.graphql (+14 -0)
packages/hoppscotch-common/src/helpers/backend/gql/mutations/DeleteMockServer.graphql (+3 -0)
packages/hoppscotch-common/src/helpers/backend/gql/mutations/UpdateMockServer.graphql (+14 -0)

...and 8 more files

📄 Description

Closes FE-1020 #1598

This pull request introduces a new "Mock Server" feature to the backend and frontend, allowing users to create, manage, and interact with mock servers associated with their collections. The implementation includes database schema updates, new service, controller, resolver, and model files.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/5385 **Author:** [@anwarulislam](https://github.com/anwarulislam) **Created:** 9/15/2025 **Status:** ✅ Merged **Merged:** 10/8/2025 **Merged by:** [@anwarulislam](https://github.com/anwarulislam) **Base:** `mock-server` ← **Head:** `feat/mock-server` --- ### 📝 Commits (10+) - [`56f5289`](https://github.com/hoppscotch/hoppscotch/commit/56f528946da98312d17feb52a5c9f771806bb488) feat: add MockServer model to support user-specific mock server configurations - [`96f855e`](https://github.com/hoppscotch/hoppscotch/commit/96f855e9e014807c67f07842d50a9836514af721) feat: implement mock server creation functionality and UI components - [`8a93917`](https://github.com/hoppscotch/hoppscotch/commit/8a939179d3f23c4af2389c656dcdb5370559517c) feat: add mock server management dashboard and edit functionality - [`58ff351`](https://github.com/hoppscotch/hoppscotch/commit/58ff35158cdc34fc7cf4475c20f4c3bd6e1db549) feat: implement mock server functionality with controller, service, model, and GraphQL support - [`80deb59`](https://github.com/hoppscotch/hoppscotch/commit/80deb599c29cb262e13fc6822424d8301d258052) feat: remove mock server components and related files - [`b9b86e4`](https://github.com/hoppscotch/hoppscotch/commit/b9b86e437a6291ff9f241d7f312b498e2dbacd6f) feat: add mock server management functionality with creation, update, and deletion support - [`572b12d`](https://github.com/hoppscotch/hoppscotch/commit/572b12d45b9302511ba83c596a42c082f569f739) feat: implement mock server middleware and controller for subdomain-based routing - [`520b5c3`](https://github.com/hoppscotch/hoppscotch/commit/520b5c3999df52d09fa4852df701727a47063446) fix: mock server middleware and service with improved request handling and detailed error responses - [`463f554`](https://github.com/hoppscotch/hoppscotch/commit/463f55410bcd17fb87ed9d66fcc2a99f33dfea4f) fix: remove unused server icon import from Sidenav component - [`dab9a1f`](https://github.com/hoppscotch/hoppscotch/commit/dab9a1f5fb775256cc2af534a226840ccae0520d) feat: add MockServerResolver to the GraphQL schema and update GetMockServer query to use String type for id ### 📊 Changes **28 files changed** (+1829 additions, -67 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-backend/prisma/schema.prisma` (+84 -67) 📝 `packages/hoppscotch-backend/src/app.module.ts` (+2 -0) 📝 `packages/hoppscotch-backend/src/errors.ts` (+24 -0) 📝 `packages/hoppscotch-backend/src/gql-schema.ts` (+2 -0) ➕ `packages/hoppscotch-backend/src/mock-server/mock-server.controller.ts` (+110 -0) ➕ `packages/hoppscotch-backend/src/mock-server/mock-server.middleware.ts` (+102 -0) ➕ `packages/hoppscotch-backend/src/mock-server/mock-server.model.ts` (+108 -0) ➕ `packages/hoppscotch-backend/src/mock-server/mock-server.module.ts` (+18 -0) ➕ `packages/hoppscotch-backend/src/mock-server/mock-server.resolver.ts` (+102 -0) ➕ `packages/hoppscotch-backend/src/mock-server/mock-server.service.ts` (+384 -0) 📝 `packages/hoppscotch-backend/src/pubsub/topicsDefs.ts` (+3 -0) 📝 `packages/hoppscotch-common/locales/en.json` (+72 -0) 📝 `packages/hoppscotch-common/src/components.d.ts` (+5 -0) 📝 `packages/hoppscotch-common/src/components/collections/Collection.vue` (+17 -0) 📝 `packages/hoppscotch-common/src/components/collections/MyCollections.vue` (+14 -0) 📝 `packages/hoppscotch-common/src/components/collections/index.vue` (+18 -0) ➕ `packages/hoppscotch-common/src/components/mockServer/CreateMockServer.vue` (+320 -0) ➕ `packages/hoppscotch-common/src/helpers/backend/gql/mutations/CreateMockServer.graphql` (+14 -0) ➕ `packages/hoppscotch-common/src/helpers/backend/gql/mutations/DeleteMockServer.graphql` (+3 -0) ➕ `packages/hoppscotch-common/src/helpers/backend/gql/mutations/UpdateMockServer.graphql` (+14 -0) _...and 8 more files_ </details> ### 📄 Description Closes FE-1020 #1598 This pull request introduces a new "Mock Server" feature to the backend and frontend, allowing users to create, manage, and interact with mock servers associated with their collections. The implementation includes database schema updates, new service, controller, resolver, and model files. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:39:17 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#5182
No description provided.