[PR #3445] [MERGED] HBE-296 feat: introducing 'infra' type and splitting model properties between 'admin' and 'infra' #4381

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/3445
Author: @mirarifhasan
Created: 10/11/2023
Status: Merged
Merged: 10/30/2023
Merged by: @mirarifhasan

Base: release/2023.12.0Head: feature/infra-type-addition


📝 Commits (10+)

  • 72a753b feat: infra type added in admin module
  • cb84440 feat: infra-resolver added in admin module
  • 156d128 feat: feedback resolved
  • fad4a64 feat: deprecated tag added in some admin ResolveFields
  • e4030c4 build: update pnpm-lock file
  • 04aaa10 feat: add field in infra type
  • 1790163 feat: admin extends user partially
  • 489370f feat: admin extends user with omitting some fields
  • 8465c83 chore: remove unused imports
  • 18449e0 build: conflict resolve in pnpm lock file

📊 Changes

7 files changed (+2873 additions, -4263 deletions)

View changed files

📝 packages/hoppscotch-backend/src/admin/admin.model.ts (+7 -2)
📝 packages/hoppscotch-backend/src/admin/admin.module.ts (+2 -1)
📝 packages/hoppscotch-backend/src/admin/admin.resolver.ts (+18 -3)
packages/hoppscotch-backend/src/admin/infra.model.ts (+10 -0)
packages/hoppscotch-backend/src/admin/infra.resolver.ts (+205 -0)
📝 packages/hoppscotch-backend/src/gql-schema.ts (+2 -0)
📝 pnpm-lock.yaml (+2629 -4257)

📄 Description

Issue Number

Closes HBE-296

Description

Previously all admin-dashboard related graphql query was done under admin type. But that ware not sound like admin properties.
(i.e.usersCount, teamCollectionsCount does not sound like admin property)

For that, we introduce a new type infra. This (infra) type will contain all the things related to the matrix and other stuff (example given below in ref-2).

admin type will be there as well with admin-specific properties.

So, now the admin and infra query and their properties looks like below:

// ref-1
query {
  admin {
    uid
    displayName
    email
    photoURL
    createdOn
  }
}

// ref-2
query {
  infra {
    userList{}
    userInfo(){}
    invitedUsers(){}
    teamList(){}
    teamInfo(){}
    // matrix
    usersCount
    teamsCount
    teamCollectionsCount
    teamRequestsCount
  }
}

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

Additional Information

Merge #3415 PR to avoid build failure in Test action.

How to test

  1. Test admin query
  2. Test infra query

🔄 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/3445 **Author:** [@mirarifhasan](https://github.com/mirarifhasan) **Created:** 10/11/2023 **Status:** ✅ Merged **Merged:** 10/30/2023 **Merged by:** [@mirarifhasan](https://github.com/mirarifhasan) **Base:** `release/2023.12.0` ← **Head:** `feature/infra-type-addition` --- ### 📝 Commits (10+) - [`72a753b`](https://github.com/hoppscotch/hoppscotch/commit/72a753b3d683b014efbafd9e4bd0a450e3d45fe5) feat: infra type added in admin module - [`cb84440`](https://github.com/hoppscotch/hoppscotch/commit/cb8444017a5930111a7962913a696b4047893957) feat: infra-resolver added in admin module - [`156d128`](https://github.com/hoppscotch/hoppscotch/commit/156d128b41ab879631213158fc86e2e3e8192da6) feat: feedback resolved - [`fad4a64`](https://github.com/hoppscotch/hoppscotch/commit/fad4a6444557089be3c71b766c4440f7e2d21960) feat: deprecated tag added in some admin ResolveFields - [`e4030c4`](https://github.com/hoppscotch/hoppscotch/commit/e4030c4b4e358dee88b7abceac8e7d23ba79f0e7) build: update pnpm-lock file - [`04aaa10`](https://github.com/hoppscotch/hoppscotch/commit/04aaa108f35aae983d60f3a34919e0bb664a57b6) feat: add field in infra type - [`1790163`](https://github.com/hoppscotch/hoppscotch/commit/1790163df6e84af6d658ca4a0cc1f2411b901863) feat: admin extends user partially - [`489370f`](https://github.com/hoppscotch/hoppscotch/commit/489370f82b936b946979ba2bafa11b9c5ea6a5e8) feat: admin extends user with omitting some fields - [`8465c83`](https://github.com/hoppscotch/hoppscotch/commit/8465c83ff6a679d16e00b130eca20941fc5b92c9) chore: remove unused imports - [`18449e0`](https://github.com/hoppscotch/hoppscotch/commit/18449e08d0bc54a662a3c3f2fbb9406489bf4759) build: conflict resolve in pnpm lock file ### 📊 Changes **7 files changed** (+2873 additions, -4263 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-backend/src/admin/admin.model.ts` (+7 -2) 📝 `packages/hoppscotch-backend/src/admin/admin.module.ts` (+2 -1) 📝 `packages/hoppscotch-backend/src/admin/admin.resolver.ts` (+18 -3) ➕ `packages/hoppscotch-backend/src/admin/infra.model.ts` (+10 -0) ➕ `packages/hoppscotch-backend/src/admin/infra.resolver.ts` (+205 -0) 📝 `packages/hoppscotch-backend/src/gql-schema.ts` (+2 -0) 📝 `pnpm-lock.yaml` (+2629 -4257) </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 --> ### Issue Number Closes HBE-296 ### Description <!-- Add a brief description of the pull request --> Previously all `admin-dashboard` related graphql query was done under `admin` type. But that ware not sound like admin properties. (i.e.`usersCount`, `teamCollectionsCount` does not sound like admin property) For that, we introduce a new type `infra`. This (infra) type will contain all the things related to the matrix and other stuff (example given below in ref-2). `admin` type will be there as well with admin-specific properties. So, now the `admin` and `infra` query and their properties looks like below: ```ts // ref-1 query { admin { uid displayName email photoURL createdOn } } // ref-2 query { infra { userList{} userInfo(){} invitedUsers(){} teamList(){} teamInfo(){} // matrix usersCount teamsCount teamCollectionsCount teamRequestsCount } } ``` <!-- 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 - [ ] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed ### Additional Information <!-- Any additional information like breaking changes, dependencies added, screenshots, comparisons between new and old behaviour, etc. --> Merge #3415 PR to avoid build failure in Test action. ### How to test 1. Test `admin` query 2. Test `infra` query --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:55:28 +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#4381
No description provided.