Skip to content

fix: data not returning from api-journeys to journeys modern#8944

Open
tanflem wants to merge 5 commits intomainfrom
tannerfleming/nes-1494-template-settings-customisable-text-resets-after-editing-the
Open

fix: data not returning from api-journeys to journeys modern#8944
tanflem wants to merge 5 commits intomainfrom
tannerfleming/nes-1494-template-settings-customisable-text-resets-after-editing-the

Conversation

@tanflem
Copy link
Copy Markdown
Contributor

@tanflem tanflem commented Apr 1, 2026

Summary by CodeRabbit

  • New Features
    • Added a customization description field for journeys to show extra descriptive information in journey views.
    • If no description exists, the field remains empty/hidden; when available it will be retrieved and displayed automatically.

@tanflem tanflem requested a review from Kneesal April 1, 2026 15:43
@tanflem tanflem self-assigned this Apr 1, 2026
@linear
Copy link
Copy Markdown

linear bot commented Apr 1, 2026

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ef4893f9-a8f5-42db-8f4c-e726ef352df5

📥 Commits

Reviewing files that changed from the base of the PR and between ee4ddae and 7c3bde6.

📒 Files selected for processing (1)
  • apis/api-journeys/src/app/modules/journey/journey.resolver.ts

Walkthrough

Adds a GraphQL field resolver journeyCustomizationDescription to the Journey resolver. Returns parent.journeyCustomizationDescription if present; otherwise queries Prisma with findFirst({ where: { id, deletedAt: null }, select: { journeyCustomizationDescription } }) and returns the selected value or null.

Changes

Cohort / File(s) Summary
Journey Resolver Enhancement
apis/api-journeys/src/app/modules/journey/journey.resolver.ts
Added @ResolveField('journeyCustomizationDescription') on JourneyResolver. Resolver returns parent.journeyCustomizationDescription when present; otherwise runs prisma.journey.findFirst filtered by id and deletedAt: null, selecting journeyCustomizationDescription, and returns that value or null.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title describes a data-returning fix from api-journeys, which aligns with the actual change of adding a GraphQL field resolver for journeyCustomizationDescription.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tannerfleming/nes-1494-template-settings-customisable-text-resets-after-editing-the

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 1, 2026

View your CI Pipeline Execution ↗ for commit 7c3bde6

Command Status Duration Result
nx affected --target=subgraph-check --base=326d... ✅ Succeeded 2s View ↗
nx affected --target=extract-translations --bas... ✅ Succeeded <1s View ↗
nx affected --target=lint --base=326d15524f8019... ✅ Succeeded 15s View ↗
nx affected --target=type-check --base=326d1552... ✅ Succeeded 11s View ↗
nx run-many --target=codegen --all --parallel=3 ✅ Succeeded 2s View ↗
nx run-many --target=prisma-generate --all --pa... ✅ Succeeded 4s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-02 14:43:01 UTC

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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 1276-1287: The resolver journeyCustomizationDescription currently
always re-fetches the Journey without filtering out soft-deleted rows and causes
unnecessary DB calls; update JourneyResolver.journeyCustomizationDescription to
first check if the parent Journey object already has
journeyCustomizationDescription (e.g., if
journey.journeyCustomizationDescription !== undefined) and return it
immediately, and only call this.prismaService.journey.findUnique when missing,
adding a soft-delete filter in the query (where: { id: journey.id, deletedAt:
null }) and selecting journeyCustomizationDescription; this avoids N+1 queries
and excludes soft-deleted journeys.
🪄 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: 7ac8d504-cf80-46d1-af58-e309fcc731db

📥 Commits

Reviewing files that changed from the base of the PR and between 326d155 and 088adc0.

📒 Files selected for processing (1)
  • apis/api-journeys/src/app/modules/journey/journey.resolver.ts

@jesus-film-bot
Copy link
Copy Markdown

Plan Error

cannot run "plan": the default workspace at path . is currently locked for this pull request by "plan".
Wait until the previous command is complete and try again

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