Move Release DAOs to Mongoose - #86
Open
AustinSMueller wants to merge 2 commits into
Open
Conversation
#278 Bundle Size — 12.87MiB (+100%).Warning Bundle contains 54 duplicate packages – View duplicate packages Bundle metrics
|
| Current #278 |
Baseline | |
|---|---|---|
877.16KiB |
- |
|
0B |
- |
|
0% |
- |
|
74 |
- |
|
117 |
- |
|
9159 |
- |
|
0 |
- |
|
0% |
- |
|
320 |
- |
|
53 |
- |
Bundle size by type no changes
| Current #278 |
Baseline | |
|---|---|---|
10.35MiB (+100%) |
- | |
1.72MiB (+100%) |
- | |
805.07KiB (+100%) |
- | |
18KiB (+100%) |
- |
Bundle analysis report Branch mongoose-release Project dashboard
Generated by RelativeCI Documentation Report issue
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates Release collection access from direct MongoDB collection usage to Mongoose-backed DAOs, and refactors release-related aggregation queries to avoid $facet (not supported by DocumentDB) by running count/results pipelines separately.
Changes:
- Introduces a Mongoose
Releasemodel and updatesReleaseDAOto extendMongooseGenericDAO. - Refactors
ReleaseServiceaggregations to run count + results in parallel without$facet, and switches calls fromreleaseCollectiontoreleaseDAO. - Updates service wiring (GraphQL router/app) and adjusts unit/integration tests for new constructors and DAO usage.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/backend/test/services/release-service.getPropsForNodeType.test.js | Updates ReleaseService construction to match the new constructor signature. |
| apps/backend/test/services/data-record-service.test.js | Removes releaseCollection injection and updates assertions for releaseDAO. |
| apps/backend/test/integration/data-record-service.integration.test.js | Updates integration setup for DataRecordService constructor change. |
| apps/backend/test/dao/dao.release.test.js | Adds unit tests validating the new Mongoose-backed ReleaseDAO behavior. |
| apps/backend/services/release-service.js | Switches release queries to ReleaseDAO and replaces $facet with parallel count/results pipelines. |
| apps/backend/services/data-record-service.js | Removes releaseCollection dependency and uses ReleaseDAO for release lookups. |
| apps/backend/routers/graphql-router.js | Updates service initialization to stop constructing/injecting the release collection. |
| apps/backend/mongoose/models/release.js | Adds the Mongoose schema/model for the release collection. |
| apps/backend/dao/release.js | Migrates ReleaseDAO from the old generic DAO to MongooseGenericDAO using ReleaseModel. |
| apps/backend/app.js | Updates server wiring to stop constructing/injecting the release collection into DataRecordService. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
AustinSMueller
marked this pull request as ready for review
July 24, 2026 20:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.