Skip to content

feat: backend - enable journey routing filter to be skipped#8603

Merged
Ur-imazing merged 5 commits intomainfrom
urimchae/nes-1195-quick-start-templates-customisable-fields-not-showing-up
Jan 19, 2026
Merged

feat: backend - enable journey routing filter to be skipped#8603
Ur-imazing merged 5 commits intomainfrom
urimchae/nes-1195-quick-start-templates-customisable-fields-not-showing-up

Conversation

@Ur-imazing
Copy link
Copy Markdown
Contributor

@Ur-imazing Ur-imazing commented Jan 16, 2026

Summary by CodeRabbit

  • New Features

    • Added a skipRoutingFilter option to journey queries to allow skipping custom domain routing filters in admin/template scenarios, enabling more flexible query behavior.
  • Tests

    • Added tests verifying skipRoutingFilter disables the routing filter when enabled, ensuring correct behavior and preventing unintended routing checks.

✏️ Tip: You can customize this high-level summary in your review settings.

@Ur-imazing Ur-imazing requested a review from csiyang January 16, 2026 02:53
@Ur-imazing Ur-imazing self-assigned this Jan 16, 2026
@Ur-imazing Ur-imazing added effort: 3 priority: soon type: feat Brand new functionality, features, pages, workflows, endpoints, etc. on stage labels Jan 16, 2026
@linear
Copy link
Copy Markdown

linear Bot commented Jan 16, 2026

@stage-branch-merger
Copy link
Copy Markdown
Contributor

I see you added the "on stage" label, I'll get this merged to the stage branch!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 16, 2026

Walkthrough

Adds a boolean skipRoutingFilter to JourneysQueryOptions across GraphQL schemas and updates the Journey resolver to conditionally skip applying custom-domain routing filters when that option is true; tests were added to verify the bypass behavior.

Changes

Cohort / File(s) Summary
GraphQL schema updates
apis/api-journeys/schema.graphql, apis/api-journeys/src/app/modules/journey/journey.graphql, apis/api-gateway/schema.graphql, apis/api-journeys-modern/schema.graphql
Added skipRoutingFilter: Boolean to the JourneysQueryOptions / input type with description "skip custom domain routing filter (for admin template customization)".
Modern schema input type
apis/api-journeys-modern/src/schema/journey/inputs/journeysQueryOptions.ts
Added optional skipRoutingFilter field to the TypeScript input definition for JourneysQueryOptions.
Journey resolver logic
apis/api-journeys/src/app/modules/journey/journey.resolver.ts
JourneyResolver.journey default options updated to include skipRoutingFilter: false; hostname-based routing filter is applied only when options.skipRoutingFilter !== true.
Tests
apis/api-journeys/src/app/modules/journey/journey.resolver.spec.ts
Added tests asserting that when skipRoutingFilter: true the resolver bypasses the routing filter and invokes DB lookup with only the id filter.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Resolver as JourneyResolver
    participant DB as Database

    Client->>Resolver: query journey(id, options{ skipRoutingFilter })
    alt options.skipRoutingFilter == true
        Resolver->>DB: findUnique(where: { id })
        DB-->>Resolver: journey
    else options.skipRoutingFilter != true
        Resolver->>DB: findUnique(where: { id, AND: [routingFilter] })
        DB-->>Resolver: journey (possibly filtered)
    end
    Resolver-->>Client: return journey
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • jaco-brink
  • tanflem
🚥 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 accurately summarizes the main change: adding the ability to skip the journey routing filter through a new skipRoutingFilter option across multiple API modules.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch urimchae/nes-1195-quick-start-templates-customisable-fields-not-showing-up

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 Jan 16, 2026

View your CI Pipeline Execution ↗ for commit 752dafe

Command Status Duration Result
nx run videos-admin-e2e:e2e ✅ Succeeded 6s View ↗
nx run journeys-admin-e2e:e2e ✅ Succeeded 29s View ↗
nx run watch-e2e:e2e ✅ Succeeded 23s View ↗
nx run journeys-e2e:e2e ✅ Succeeded 19s View ↗
nx run resources-e2e:e2e ✅ Succeeded 12s View ↗
nx run short-links-e2e:e2e ✅ Succeeded 3s View ↗
nx run player-e2e:e2e ✅ Succeeded 3s View ↗
nx run-many --target=vercel-alias --projects=jo... ✅ Succeeded 2s View ↗
Additional runs (20) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2026-01-19 01:29:53 UTC

@Ur-imazing Ur-imazing removed the request for review from csiyang January 16, 2026 02:55
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin January 16, 2026 03:19 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - resources January 16, 2026 03:19 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - short-links January 16, 2026 03:19 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys January 16, 2026 03:19 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - videos-admin January 16, 2026 03:19 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 16, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
short-links ✅ Ready short-links preview Mon Jan 19 14:19:40 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 16, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
player ✅ Ready player preview Mon Jan 19 14:19:27 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 16, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
videos-admin ✅ Ready videos-admin preview Mon Jan 19 14:19:49 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 16, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
resources ✅ Ready resources preview Mon Jan 19 14:19:44 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 16, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
journeys ✅ Ready journeys preview Mon Jan 19 14:20:00 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 16, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
watch ✅ Ready watch preview Mon Jan 19 14:19:53 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 16, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
journeys-admin ✅ Ready journeys-admin preview Mon Jan 19 14:21:48 NZDT 2026

@Ur-imazing Ur-imazing force-pushed the urimchae/nes-1195-quick-start-templates-customisable-fields-not-showing-up branch from a5ed82f to d426c20 Compare January 16, 2026 04:03
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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apis/api-journeys/schema.graphql (1)

2240-2256: Gate skipRoutingFilter to admin/internal callers.
The journey query is public (no auth guards) and exposes skipRoutingFilter on JourneysQueryOptions. Any client can set skipRoutingFilter: true to bypass the custom domain routing filter, allowing unauthorized access to journeys that should be isolated by hostname. Add authorization checks (e.g., @UseGuards(AppCaslGuard)) or move this flag to an admin-only query/input.

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8d61a78 and 6ffa857.

⛔ Files ignored due to path filters (1)
  • apis/api-journeys/src/app/__generated__/graphql.ts is excluded by !**/__generated__/**
📒 Files selected for processing (4)
  • apis/api-journeys/schema.graphql
  • apis/api-journeys/src/app/modules/journey/journey.graphql
  • apis/api-journeys/src/app/modules/journey/journey.resolver.spec.ts
  • apis/api-journeys/src/app/modules/journey/journey.resolver.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • apis/api-journeys/src/app/modules/journey/journey.resolver.ts
  • apis/api-journeys/src/app/modules/journey/journey.resolver.spec.ts
  • apis/api-journeys/src/app/modules/journey/journey.graphql
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: tataihono
Repo: JesusFilm/core PR: 7153
File: apis/api-journeys-modern/src/schema/journey/journey.ts:72-80
Timestamp: 2025-07-10T22:50:12.639Z
Learning: In the JesusFilm Core codebase, journey data is public and does not require authorization checks for read access in GraphQL queries like journeySimpleGet.
Learnt from: mikeallisonJS
Repo: JesusFilm/core PR: 7498
File: apis/api-journeys-modern/src/schema/action/emailAction/blockUpdateEmailAction.mutation.ts:26-36
Timestamp: 2025-09-08T22:56:21.606Z
Learning: In the action mutations migration (PR `#7498`), the `journeyId` parameter is intentionally kept in blockUpdate*Action mutations even when unused in the resolver, to maintain API compatibility during the migration from the old "api-journeys" endpoint to the modern "api-journeys-modern" endpoint.
📚 Learning: 2025-09-16T04:10:28.624Z
Learnt from: jaco-brink
Repo: JesusFilm/core PR: 7679
File: apis/api-gateway/schema.graphql:0-0
Timestamp: 2025-09-16T04:10:28.624Z
Learning: In PR `#7679` (showAssistant field), the showAssistant field was intentionally excluded from JourneyUpdateInput because it will be controlled through direct database operations rather than through GraphQL mutations, keeping it out of the public API surface while still being queryable.

Applied to files:

  • apis/api-journeys/schema.graphql
📚 Learning: 2025-09-08T22:56:21.606Z
Learnt from: mikeallisonJS
Repo: JesusFilm/core PR: 7498
File: apis/api-journeys-modern/src/schema/action/emailAction/blockUpdateEmailAction.mutation.ts:26-36
Timestamp: 2025-09-08T22:56:21.606Z
Learning: In the action mutations migration (PR `#7498`), the `journeyId` parameter is intentionally kept in blockUpdate*Action mutations even when unused in the resolver, to maintain API compatibility during the migration from the old "api-journeys" endpoint to the modern "api-journeys-modern" endpoint.

Applied to files:

  • apis/api-journeys/schema.graphql
📚 Learning: 2025-08-20T21:51:25.797Z
Learnt from: mikeallisonJS
Repo: JesusFilm/core PR: 7486
File: apis/api-journeys-modern/schema.graphql:1068-1074
Timestamp: 2025-08-20T21:51:25.797Z
Learning: Before suggesting type changes during API migrations, always verify the existing implementation to ensure consistency is maintained. The migration to api-journeys-modern should preserve the same field types as the original api-journeys schema.

Applied to files:

  • apis/api-journeys/schema.graphql
📚 Learning: 2025-08-26T20:45:14.971Z
Learnt from: mikeallisonJS
Repo: JesusFilm/core PR: 7498
File: apis/api-gateway/schema.graphql:117-152
Timestamp: 2025-08-26T20:45:14.971Z
Learning: During API migrations using Apollo Federation, override directives should be maintained in the gateway schema to route requests to the new service while keeping the old service as fallback. The override: "api-journeys" directive tells the supergraph to route requests to API_JOURNEYS_MODERN but fall back to the original api-journeys service if needed. These directives should only be removed after migration completion, not during the migration process.

Applied to files:

  • apis/api-journeys/schema.graphql
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: lint (22)

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@github-actions github-actions Bot temporarily deployed to Preview - videos-admin January 18, 2026 20:50 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - short-links January 18, 2026 20:50 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys January 18, 2026 20:50 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - resources January 18, 2026 20:50 Inactive
@Ur-imazing Ur-imazing requested a review from Kneesal January 18, 2026 22:54
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin January 18, 2026 22:56 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys January 18, 2026 22:56 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - short-links January 18, 2026 22:56 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - resources January 18, 2026 22:56 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - videos-admin January 18, 2026 22:56 Inactive
@Ur-imazing Ur-imazing requested review from Kneesal and removed request for Kneesal January 18, 2026 23:08
@github-actions github-actions Bot temporarily deployed to Preview - journeys January 19, 2026 01:18 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin January 19, 2026 01:18 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - short-links January 19, 2026 01:18 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - resources January 19, 2026 01:18 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - videos-admin January 19, 2026 01:18 Inactive
@Ur-imazing Ur-imazing added this pull request to the merge queue Jan 19, 2026
Merged via the queue into main with commit 29ac2d3 Jan 19, 2026
38 checks passed
@Ur-imazing Ur-imazing deleted the urimchae/nes-1195-quick-start-templates-customisable-fields-not-showing-up branch January 19, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort: 3 on stage priority: soon type: feat Brand new functionality, features, pages, workflows, endpoints, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants