[PR #3591] [MERGED] HBE-326 feature: server configuration through GraphQL API #4441

Closed
opened 2026-03-17 01:58:46 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/3591
Author: @mirarifhasan
Created: 11/24/2023
Status: Merged
Merged: 12/12/2023
Merged by: @mirarifhasan

Base: release/2023.12.0Head: feat/server-config


📝 Commits (10+)

  • 49c2ee0 feat: restart cmd added in aio service
  • 5bee347 feat: nestjs config package added
  • 74cec03 test: fix all broken test case
  • c352202 feat: infra config module add with get-update-reset functionality
  • 4e188f3 test: fix test case failure
  • 0a10f7c feat: update infra configs mutation added
  • 6157848 feat: utilise ConfigService in util functions
  • 1d05a76 chore: remove saml stuff
  • ef84125 feat: removed saml stuffs
  • 9f62ed6 fix: config service precedence

📊 Changes

37 files changed (+1717 additions, -613 deletions)

View changed files

📝 docker-compose.yml (+1 -0)
📝 packages/hoppscotch-backend/package.json (+1 -0)
packages/hoppscotch-backend/prisma/migrations/20231124104640_infra_config/migration.sql (+14 -0)
📝 packages/hoppscotch-backend/prisma/schema.prisma (+9 -0)
📝 packages/hoppscotch-backend/src/admin/admin.module.ts (+2 -2)
📝 packages/hoppscotch-backend/src/admin/admin.service.spec.ts (+3 -0)
📝 packages/hoppscotch-backend/src/admin/admin.service.ts (+3 -1)
📝 packages/hoppscotch-backend/src/admin/infra.resolver.ts (+91 -2)
📝 packages/hoppscotch-backend/src/app.module.ts (+57 -38)
📝 packages/hoppscotch-backend/src/auth/auth.controller.ts (+18 -3)
📝 packages/hoppscotch-backend/src/auth/auth.module.ts (+34 -13)
📝 packages/hoppscotch-backend/src/auth/auth.service.spec.ts (+14 -1)
📝 packages/hoppscotch-backend/src/auth/auth.service.ts (+21 -11)
📝 packages/hoppscotch-backend/src/auth/guards/github-sso.guard.ts (+12 -1)
📝 packages/hoppscotch-backend/src/auth/guards/google-sso.guard.ts (+12 -1)
📝 packages/hoppscotch-backend/src/auth/guards/microsoft-sso-.guard.ts (+12 -1)
📝 packages/hoppscotch-backend/src/auth/helper.ts (+15 -7)
📝 packages/hoppscotch-backend/src/auth/strategies/github.strategy.ts (+6 -4)
📝 packages/hoppscotch-backend/src/auth/strategies/google.strategy.ts (+6 -4)
📝 packages/hoppscotch-backend/src/auth/strategies/jwt.strategy.ts (+6 -2)

...and 17 more files

📄 Description

Closes HBE-326

Description

This PR introduces the ability (in backend service) to update server configurations (GOOGLE_CLIENT_ID, MAILER_SMTP_URL, VITE_ALLOWED_AUTH_PROVIDERS, etc) from the UI (Admin Dashboard).

Graphql Mutation and Query lists: https://linear.app/hopp/issue/HBE-326/shc-hands-on-implementation-server-configuration

Details of backend implementation: https://www.notion.so/hoppscotch/Env-Variable-Configuration-from-UI-609016e231fc4f8ab85d3b2d83926ec1

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Testing Instruction

  1. You can test/run the above query and mutation.
  2. Check the InfraCondig table (in DB) which should reflect the new value.
  3. Check after any mutation, the backend server will restart

Additional Information

Nil


🔄 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/3591 **Author:** [@mirarifhasan](https://github.com/mirarifhasan) **Created:** 11/24/2023 **Status:** ✅ Merged **Merged:** 12/12/2023 **Merged by:** [@mirarifhasan](https://github.com/mirarifhasan) **Base:** `release/2023.12.0` ← **Head:** `feat/server-config` --- ### 📝 Commits (10+) - [`49c2ee0`](https://github.com/hoppscotch/hoppscotch/commit/49c2ee0d38c9a3bfe8f440295445a81de97ad8e3) feat: restart cmd added in aio service - [`5bee347`](https://github.com/hoppscotch/hoppscotch/commit/5bee3471c52c14644e39cbaf046548963a20a6fd) feat: nestjs config package added - [`74cec03`](https://github.com/hoppscotch/hoppscotch/commit/74cec0365b0e42e6dc2bdd59c591cc08cb7d3d90) test: fix all broken test case - [`c352202`](https://github.com/hoppscotch/hoppscotch/commit/c3522025c8d9392bfcd5b418688ae0158d45134f) feat: infra config module add with get-update-reset functionality - [`4e188f3`](https://github.com/hoppscotch/hoppscotch/commit/4e188f3c11d8c311fcfe330270e0092ae64ce11b) test: fix test case failure - [`0a10f7c`](https://github.com/hoppscotch/hoppscotch/commit/0a10f7c6540034a2250f5390743f633ddfb8af03) feat: update infra configs mutation added - [`6157848`](https://github.com/hoppscotch/hoppscotch/commit/6157848f56ecd61f9c296f939d959837ee128519) feat: utilise ConfigService in util functions - [`1d05a76`](https://github.com/hoppscotch/hoppscotch/commit/1d05a76b59a42682bb8e49347bb48e1ea37eec05) chore: remove saml stuff - [`ef84125`](https://github.com/hoppscotch/hoppscotch/commit/ef8412544acc30cdd112681f14474f331212bf4e) feat: removed saml stuffs - [`9f62ed6`](https://github.com/hoppscotch/hoppscotch/commit/9f62ed6c9098b1d6c6185f4ee606100869691351) fix: config service precedence ### 📊 Changes **37 files changed** (+1717 additions, -613 deletions) <details> <summary>View changed files</summary> 📝 `docker-compose.yml` (+1 -0) 📝 `packages/hoppscotch-backend/package.json` (+1 -0) ➕ `packages/hoppscotch-backend/prisma/migrations/20231124104640_infra_config/migration.sql` (+14 -0) 📝 `packages/hoppscotch-backend/prisma/schema.prisma` (+9 -0) 📝 `packages/hoppscotch-backend/src/admin/admin.module.ts` (+2 -2) 📝 `packages/hoppscotch-backend/src/admin/admin.service.spec.ts` (+3 -0) 📝 `packages/hoppscotch-backend/src/admin/admin.service.ts` (+3 -1) 📝 `packages/hoppscotch-backend/src/admin/infra.resolver.ts` (+91 -2) 📝 `packages/hoppscotch-backend/src/app.module.ts` (+57 -38) 📝 `packages/hoppscotch-backend/src/auth/auth.controller.ts` (+18 -3) 📝 `packages/hoppscotch-backend/src/auth/auth.module.ts` (+34 -13) 📝 `packages/hoppscotch-backend/src/auth/auth.service.spec.ts` (+14 -1) 📝 `packages/hoppscotch-backend/src/auth/auth.service.ts` (+21 -11) 📝 `packages/hoppscotch-backend/src/auth/guards/github-sso.guard.ts` (+12 -1) 📝 `packages/hoppscotch-backend/src/auth/guards/google-sso.guard.ts` (+12 -1) 📝 `packages/hoppscotch-backend/src/auth/guards/microsoft-sso-.guard.ts` (+12 -1) 📝 `packages/hoppscotch-backend/src/auth/helper.ts` (+15 -7) 📝 `packages/hoppscotch-backend/src/auth/strategies/github.strategy.ts` (+6 -4) 📝 `packages/hoppscotch-backend/src/auth/strategies/google.strategy.ts` (+6 -4) 📝 `packages/hoppscotch-backend/src/auth/strategies/jwt.strategy.ts` (+6 -2) _...and 17 more files_ </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> <!-- Issue # here --> Closes HBE-326 ### Description <!-- Add a brief description of the pull request --> This PR introduces the ability (in backend service) to update server configurations (`GOOGLE_CLIENT_ID`, `MAILER_SMTP_URL`, `VITE_ALLOWED_AUTH_PROVIDERS`, etc) from the UI (Admin Dashboard). Graphql Mutation and Query lists: https://linear.app/hopp/issue/HBE-326/shc-hands-on-implementation-server-configuration Details of backend implementation: https://www.notion.so/hoppscotch/Env-Variable-Configuration-from-UI-609016e231fc4f8ab85d3b2d83926ec1 <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [x] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed ### Testing Instruction 1. You can test/run the above query and mutation. 2. Check the InfraCondig table (in DB) which should reflect the new value. 3. Check after any mutation, the backend server will restart ### Additional Information <!-- Any additional information like breaking changes, dependencies added, screenshots, comparisons between new and old behaviour, etc. --> Nil --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:58:46 +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#4441
No description provided.