[PR #3614] [MERGED] feat: addition of data field into User and Team Collections #4449

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/3614
Author: @balub
Created: 12/1/2023
Status: Merged
Merged: 12/5/2023
Merged by: @balub

Base: release/2023.12.0Head: feat/collection-headers


📝 Commits (10+)

  • 85c42da feat: added new columns into the TeamCollections and UserCollections models
  • f13d004 feat: completed addition of new data field in TeamCollection
  • e712d1e feat: completed addition of new data field in UserCollections
  • 990d500 chore: updated all tests in team-collection module
  • 289cd06 chore: added tests for updateTeamCollection method in team-collection module
  • a67ecaa chore: refactored all existing testcases in user-collection to reflect new changes
  • 1f2aaf5 chore: added new testcases for updateUserCollection method in user-collection module
  • 337c794 chore: made data field optional in team and user collections
  • c1fdb04 chore: fixed edgecases for data being null
  • 55c7015 chore: resolved issue with team-request testcases

📊 Changes

16 files changed (+1162 additions, -119 deletions)

View changed files

packages/hoppscotch-backend/prisma/migrations/20231130082054_collection_headers/migration.sql (+5 -0)
📝 packages/hoppscotch-backend/prisma/schema.prisma (+4 -1)
📝 packages/hoppscotch-backend/src/errors.ts (+14 -0)
📝 packages/hoppscotch-backend/src/pubsub/topicsDefs.ts (+1 -1)
📝 packages/hoppscotch-backend/src/team-collection/input-type.args.ts (+39 -0)
📝 packages/hoppscotch-backend/src/team-collection/team-collection.model.ts (+6 -1)
📝 packages/hoppscotch-backend/src/team-collection/team-collection.resolver.ts (+29 -1)
📝 packages/hoppscotch-backend/src/team-collection/team-collection.service.spec.ts (+315 -36)
📝 packages/hoppscotch-backend/src/team-collection/team-collection.service.ts (+99 -14)
📝 packages/hoppscotch-backend/src/team-request/team-request.service.spec.ts (+1 -0)
📝 packages/hoppscotch-backend/src/types/CollectionFolder.ts (+2 -0)
📝 packages/hoppscotch-backend/src/user-collection/input-type.args.ts (+37 -0)
📝 packages/hoppscotch-backend/src/user-collection/user-collection.resolver.ts (+32 -1)
📝 packages/hoppscotch-backend/src/user-collection/user-collection.service.spec.ts (+465 -49)
📝 packages/hoppscotch-backend/src/user-collection/user-collection.service.ts (+107 -15)
📝 packages/hoppscotch-backend/src/user-collection/user-collections.model.ts (+6 -0)

📄 Description

Closes HBE-329

Description

In this PR we introduce a new column in the TeamCollection and UserCollection table called data. Along with the TeamCollection and UserCollection GQL type has a new field called data which is given below.

type TeamCollection {
  id: ID!
  title: String!
  data: String
  parentID: ID
  team: Team!
  parent: TeamCollection
  children: [TeamCollection!]!
}

type UserCollection {
  id: ID!
  title: String!
  data: String
  type: ReqType!
  requests: [UserRequest!]!
  user: User!
  parent: UserCollection
  childrenREST: [UserCollection!]!
  childrenGQL: [UserCollection!]!
}

In addition to the aforementioned changes, mutations responsible for renaming TeamCollection and UserCollection titles renameCollection and renameUserCollection have been deprecated and it is preferred if the following mutations are used instead respectively:

  • updateTeamCollection
  • updateUserCollection

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


🔄 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/3614 **Author:** [@balub](https://github.com/balub) **Created:** 12/1/2023 **Status:** ✅ Merged **Merged:** 12/5/2023 **Merged by:** [@balub](https://github.com/balub) **Base:** `release/2023.12.0` ← **Head:** `feat/collection-headers` --- ### 📝 Commits (10+) - [`85c42da`](https://github.com/hoppscotch/hoppscotch/commit/85c42da31c87d068ba318033dbd46db3ecff3fff) feat: added new columns into the TeamCollections and UserCollections models - [`f13d004`](https://github.com/hoppscotch/hoppscotch/commit/f13d00465d9eefb534f0bc5e8ec177f44ae0fae6) feat: completed addition of new data field in TeamCollection - [`e712d1e`](https://github.com/hoppscotch/hoppscotch/commit/e712d1e3ae77e5c763b9940b46991ed238052933) feat: completed addition of new data field in UserCollections - [`990d500`](https://github.com/hoppscotch/hoppscotch/commit/990d5003336e2acdabf5451c777fa094dbf4219a) chore: updated all tests in team-collection module - [`289cd06`](https://github.com/hoppscotch/hoppscotch/commit/289cd06995445a7c7202723ae9b94f56ccf6edf7) chore: added tests for updateTeamCollection method in team-collection module - [`a67ecaa`](https://github.com/hoppscotch/hoppscotch/commit/a67ecaa92251d3917f21b8940d0712d92265cd5b) chore: refactored all existing testcases in user-collection to reflect new changes - [`1f2aaf5`](https://github.com/hoppscotch/hoppscotch/commit/1f2aaf528a0a151bb15b2b382e6286b3cdf43907) chore: added new testcases for updateUserCollection method in user-collection module - [`337c794`](https://github.com/hoppscotch/hoppscotch/commit/337c79447e579f96e350bdf5f328faa59ee4ac7e) chore: made data field optional in team and user collections - [`c1fdb04`](https://github.com/hoppscotch/hoppscotch/commit/c1fdb04130a61869cdf2360336439b4202e87372) chore: fixed edgecases for data being null - [`55c7015`](https://github.com/hoppscotch/hoppscotch/commit/55c70159ed31bb87f6a5abcd9e8f0f11a7b90dce) chore: resolved issue with team-request testcases ### 📊 Changes **16 files changed** (+1162 additions, -119 deletions) <details> <summary>View changed files</summary> ➕ `packages/hoppscotch-backend/prisma/migrations/20231130082054_collection_headers/migration.sql` (+5 -0) 📝 `packages/hoppscotch-backend/prisma/schema.prisma` (+4 -1) 📝 `packages/hoppscotch-backend/src/errors.ts` (+14 -0) 📝 `packages/hoppscotch-backend/src/pubsub/topicsDefs.ts` (+1 -1) 📝 `packages/hoppscotch-backend/src/team-collection/input-type.args.ts` (+39 -0) 📝 `packages/hoppscotch-backend/src/team-collection/team-collection.model.ts` (+6 -1) 📝 `packages/hoppscotch-backend/src/team-collection/team-collection.resolver.ts` (+29 -1) 📝 `packages/hoppscotch-backend/src/team-collection/team-collection.service.spec.ts` (+315 -36) 📝 `packages/hoppscotch-backend/src/team-collection/team-collection.service.ts` (+99 -14) 📝 `packages/hoppscotch-backend/src/team-request/team-request.service.spec.ts` (+1 -0) 📝 `packages/hoppscotch-backend/src/types/CollectionFolder.ts` (+2 -0) 📝 `packages/hoppscotch-backend/src/user-collection/input-type.args.ts` (+37 -0) 📝 `packages/hoppscotch-backend/src/user-collection/user-collection.resolver.ts` (+32 -1) 📝 `packages/hoppscotch-backend/src/user-collection/user-collection.service.spec.ts` (+465 -49) 📝 `packages/hoppscotch-backend/src/user-collection/user-collection.service.ts` (+107 -15) 📝 `packages/hoppscotch-backend/src/user-collection/user-collections.model.ts` (+6 -0) </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 --> Closes HBE-329 ### Description <!-- Add a brief description of the pull request --> In this PR we introduce a new column in the `TeamCollection` and `UserCollection` table called `data`. Along with the `TeamCollection` and `UserCollection` GQL type has a new field called `data` which is given below. ``` type TeamCollection { id: ID! title: String! data: String parentID: ID team: Team! parent: TeamCollection children: [TeamCollection!]! } type UserCollection { id: ID! title: String! data: String type: ReqType! requests: [UserRequest!]! user: User! parent: UserCollection childrenREST: [UserCollection!]! childrenGQL: [UserCollection!]! } ``` In addition to the aforementioned changes, mutations responsible for renaming `TeamCollection` and `UserCollection` titles `renameCollection` and `renameUserCollection` have been deprecated and it is preferred if the following mutations are used instead respectively: * `updateTeamCollection` * `updateUserCollection` <!-- 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 - [x] Not Completed - [] 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. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:59:02 +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#4449
No description provided.