Skip to content

Move Release DAOs to Mongoose - #86

Open
AustinSMueller wants to merge 2 commits into
prisma-to-mongoose-migrationfrom
mongoose-release
Open

Move Release DAOs to Mongoose#86
AustinSMueller wants to merge 2 commits into
prisma-to-mongoose-migrationfrom
mongoose-release

Conversation

@AustinSMueller

Copy link
Copy Markdown
Contributor

No description provided.

@relativeci

relativeci Bot commented Jul 24, 2026

Copy link
Copy Markdown

#278 Bundle Size — 12.87MiB (+100%).

⚠️ Baseline job is missing

Warning

Bundle contains 54 duplicate packages – View duplicate packages

Bundle metrics  no changes
                 Current
#278
     Baseline
No change  Initial JS 877.16KiB -
No change  Initial CSS 0B -
No change  Cache Invalidation 0% -
No change  Chunks 74 -
No change  Assets 117 -
No change  Modules 9159 -
No change  Duplicate Modules 0 -
No change  Duplicate Code 0% -
No change  Packages 320 -
No change  Duplicate Packages 53 -
Bundle size by type  no changes
                 Current
#278
     Baseline
No change  JS 10.35MiB (+100%) -
No change  IMG 1.72MiB (+100%) -
No change  Fonts 805.07KiB (+100%) -
No change  CSS 18KiB (+100%) -

Bundle analysis reportBranch mongoose-releaseProject dashboard


Generated by RelativeCIDocumentationReport issue

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Release model and updates ReleaseDAO to extend MongooseGenericDAO.
  • Refactors ReleaseService aggregations to run count + results in parallel without $facet, and switches calls from releaseCollection to releaseDAO.
  • 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.

Comment thread apps/backend/services/release-service.js
Comment thread apps/backend/services/release-service.js
@AustinSMueller
AustinSMueller marked this pull request as ready for review July 24, 2026 20:27
@AustinSMueller
AustinSMueller requested a review from n2iw July 24, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants