feat(api-journeys): add journeyTemplateLanguageIds query#8976
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughAdds a new GraphQL query Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Gateway as API_Gateway
participant Journeys as API_JOURNEYS
participant DB as Prisma/Database
Client->>Gateway: query journeyTemplateLanguageIds
Gateway->>Journeys: delegated `@join__field` request
Journeys->>DB: findMany(where:{template:true,status:published,teamId:"jfp-team"}, distinct:["languageId"], select:{languageId:true})
DB-->>Journeys: [{languageId:"en"},{languageId:"es"},...]
Journeys-->>Gateway: ["en","es",...]
Gateway-->>Client: ["en","es",...]
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 714199d
☁️ Nx Cloud last updated this comment at |
Add new GraphQL query that returns distinct language IDs from published templates (template=true, status=published, teamId=jfp-team). Uses Prisma findMany with distinct to efficiently fetch only the unique language IDs without loading full journey data. This query enables the frontend templates page language dropdown to be dynamically populated instead of using a hardcoded language list. NES-1537 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
31cc57d to
3d3d034
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apis/api-journeys/src/app/modules/journey/journey.resolver.ts`:
- Around line 214-221: The Prisma query in journey.resolver.ts calling
this.prismaService.journey.findMany (the query that selects distinct languageId
for templates) is missing the soft-delete filter; update the where clause in
that query to include deletedAt: null so only non-deleted journeys are returned
(i.e., add deletedAt: null alongside template: true, status:
JourneyStatus.published, teamId: 'jfp-team').
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 380d77d6-442d-42af-93fd-d0d6e4fa0507
⛔ Files ignored due to path filters (1)
apis/api-journeys/src/app/__generated__/graphql.tsis excluded by!**/__generated__/**
📒 Files selected for processing (3)
apis/api-journeys/src/app/modules/journey/journey.graphqlapis/api-journeys/src/app/modules/journey/journey.resolver.spec.tsapis/api-journeys/src/app/modules/journey/journey.resolver.ts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflicts by accepting main's backend files (backend PR #8976 already merged). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolves NES-1542
Summary
journeyTemplateLanguageIds: [String!]!GraphQL query toapi-journeystemplate=true,status=published,teamId='jfp-team')findManywithdistinct: ['languageId']andselect: { languageId: true }for efficient queryingThis is the backend half of NES-1537. The frontend PR (#8973) depends on this query being available.
Test plan
Post-Deploy Monitoring & Validation
journeyTemplateLanguageIdsquery🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Tests