refactor: streamline GraphQL schema by removing deprecated fields and…#8915
refactor: streamline GraphQL schema by removing deprecated fields and…#8915mikeallisonJS wants to merge 5 commits intomainfrom
Conversation
… updating input types - Removed `cardBlockCreate` and `cardBlockUpdate` mutations from `api-journeys` schema. - Updated `adminJourney` query to align with modern API structure. - Refactored `DateTimeFilter` input type for better clarity and usage. - Adjusted various GraphQL types to ensure consistency across schemas. - Cleaned up unused imports and types in resolver files to enhance maintainability.
WalkthroughRemoved federation overrides and relocated/rescoped several block mutation fields and input/scalar declarations in the gateway schema; deleted legacy admin and create/update block mutations and their resolver/tests in api-journeys; adjusted join annotations and reordered some media fields. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 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 |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run journeys-e2e:e2e |
❌ Failed | 3m 21s | View ↗ |
nx run journeys-admin-e2e:e2e |
✅ Succeeded | 28s | View ↗ |
nx run resources-e2e:e2e |
✅ Succeeded | 15s | View ↗ |
nx run watch-e2e:e2e |
✅ Succeeded | 18s | View ↗ |
nx run videos-admin-e2e:e2e |
✅ Succeeded | 4s | 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-03-31 02:06:20 UTC
|
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.
|
There was a problem hiding this comment.
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-modern/schema.graphql (1)
1348-1355:⚠️ Potential issue | 🟠 MajorRemove the stale
api-journeysoverrides that now point to non-existent fields.
apis/api-journeys/schema.graphqlno longer exposescardBlockUpdateoradminJourney, but the modern schema still marks those fields with@override(from: "api-journeys")at lines 1355 and 1737. These stale directives will break Apollo Federation composition and routing, since the override source fields no longer exist.Suggested SDL fix
cardBlockUpdate( id: ID! input: CardBlockUpdateInput! """drop this parameter after merging teams""" journeyId: ID - ): CardBlock! `@override`(from: "api-journeys") + ): CardBlock! @@ - adminJourney(id: ID!, idType: IdType = slug): Journey! `@override`(from: "api-journeys") + adminJourney(id: ID!, idType: IdType = slug): Journey!🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apis/api-journeys-modern/schema.graphql` around lines 1348 - 1355, The schema contains stale `@override` directives referencing removed fields in the other service; remove the obsolete `@override`(from: "api-journeys") annotations from the CardBlock mutations (cardBlockUpdate) and the adminJourney field so the modern schema no longer points to non-existent sources — locate the occurrences of the `@override` directive on cardBlockUpdate and adminJourney in the SDL and delete those `@override`(from: "api-journeys") annotations, leaving the fields defined locally in the modern schema.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@apis/api-journeys-modern/schema.graphql`:
- Around line 1348-1355: The schema contains stale `@override` directives
referencing removed fields in the other service; remove the obsolete
`@override`(from: "api-journeys") annotations from the CardBlock mutations
(cardBlockUpdate) and the adminJourney field so the modern schema no longer
points to non-existent sources — locate the occurrences of the `@override`
directive on cardBlockUpdate and adminJourney in the SDL and delete those
`@override`(from: "api-journeys") annotations, leaving the fields defined locally
in the modern schema.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: ca05109d-dd45-4a0b-bc60-e4dfccf302a8
⛔ Files ignored due to path filters (52)
apis/api-journeys/src/__generated__/graphql.tsis excluded by!**/__generated__/**apis/api-journeys/src/app/__generated__/graphql.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/BlockActionDelete.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/BlockDelete.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/BlockDeleteForCoverImage.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/BlockOrderUpdate.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/CardCtaDelete.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/CardFormDelete.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/CardIntroDelete.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/CardPollDelete.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/CardQuoteDelete.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/CardVideoDelete.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/CardVideoRestore.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/CoverBlockDelete.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/CoverBlockRestore.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/DuplicatedBlock.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/GetStepBlocksWithPosition.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/JourneyAiTranslateCreateSubscription.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/JourneyImageBlockDelete.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/MenuBlockDelete.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/MultiselectWithButtonDelete.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/MultiselectWithButtonRestore.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/NewBlock.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/PosterImageBlockDelete.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/PosterImageBlockRestore.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/RadioOptionImageDelete.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/RadioOptionImageRestore.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/RestoredBlock.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/StepBlockCreateFromAction.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/StepBlockCreateFromSocialPreview.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/StepBlockDeleteFromAction.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/StepBlockDeleteFromActionWithoutAction.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/StepBlockDeleteFromSocialPreview.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/StepBlockDeleteFromStep.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/StepBlockRestoreFromAction.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/StepBlockRestoreFromSocialPreview.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/TestJourney.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/TextResponseWithButtonDelete.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/TranslatedJourney.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/globalTypes.tsis excluded by!**/__generated__/**apps/journeys/__generated__/JourneyAiTranslateCreateSubscription.tsis excluded by!**/__generated__/**apps/journeys/__generated__/TranslatedJourney.tsis excluded by!**/__generated__/**apps/journeys/__generated__/globalTypes.tsis excluded by!**/__generated__/**apps/resources/__generated__/JourneyAiTranslateCreateSubscription.tsis excluded by!**/__generated__/**apps/resources/__generated__/TranslatedJourney.tsis excluded by!**/__generated__/**apps/resources/__generated__/globalTypes.tsis excluded by!**/__generated__/**apps/watch/__generated__/JourneyAiTranslateCreateSubscription.tsis excluded by!**/__generated__/**apps/watch/__generated__/TranslatedJourney.tsis excluded by!**/__generated__/**apps/watch/__generated__/globalTypes.tsis excluded by!**/__generated__/**libs/journeys/ui/__generated__/globalTypes.tsis excluded by!**/__generated__/**libs/journeys/ui/src/libs/useJourneyAiTranslateSubscription/__generated__/JourneyAiTranslateCreateSubscription.tsis excluded by!**/__generated__/**libs/journeys/ui/src/libs/useJourneyAiTranslateSubscription/__generated__/TranslatedJourney.tsis excluded by!**/__generated__/**
📒 Files selected for processing (16)
apis/api-gateway/schema.graphqlapis/api-journeys-modern/schema.graphqlapis/api-journeys-modern/src/schema/block/button/buttonBlockCreate.mutation.tsapis/api-journeys-modern/src/schema/block/button/buttonBlockUpdate.mutation.tsapis/api-journeys-modern/src/schema/block/card/cardBlockCreate.mutation.tsapis/api-journeys-modern/src/schema/journeyProfile/journeyProfileUpdate.mutation.tsapis/api-journeys-modern/src/schema/userRole/getUserRole.query.tsapis/api-journeys/schema.graphqlapis/api-journeys/src/app/modules/block/card/card.graphqlapis/api-journeys/src/app/modules/block/card/card.resolver.spec.tsapis/api-journeys/src/app/modules/block/card/card.resolver.tsapis/api-journeys/src/app/modules/block/icon/icon.resolver.tsapis/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.tsapis/api-media/schema.graphql
💤 Files with no reviewable changes (10)
- apis/api-journeys-modern/src/schema/block/card/cardBlockCreate.mutation.ts
- apis/api-journeys-modern/src/schema/userRole/getUserRole.query.ts
- apis/api-journeys-modern/src/schema/journeyProfile/journeyProfileUpdate.mutation.ts
- apis/api-journeys/src/app/modules/journey/journey.graphql
- apis/api-journeys-modern/src/schema/block/button/buttonBlockCreate.mutation.ts
- apis/api-journeys/src/app/modules/block/icon/icon.resolver.ts
- apis/api-journeys-modern/src/schema/block/button/buttonBlockUpdate.mutation.ts
- apis/api-journeys/src/app/modules/journey/journey.resolver.ts
- apis/api-journeys/src/app/modules/block/card/card.graphql
- apis/api-journeys/src/app/modules/journey/journey.resolver.spec.ts
…n API alignment - Reintroduced `iconBlockCreate` mutation in `api-gateway` and `api-journeys` schemas with updated input type. - Removed deprecated `iconBlockCreate` definitions from previous locations. - Ensured consistency in `IconBlockCreateInput` across schemas. - Cleaned up related resolver files by removing unused imports and tests for the removed mutation.
|
Merge conflict attempting to merge this into stage. Please fix manually. |
…gnment - Added an override directive to the cardBlockCreate mutation in both api-gateway and api-journeys-modern schemas to ensure consistency in API behavior. - Updated the resolver for cardBlockCreate to include the override configuration, enhancing clarity in the mutation's origin.
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-gateway/schema.graphql`:
- Around line 1326-1327: The gateway schema's VideoBlock.notes field is missing
its federation ownership marker; locate the notes field on the VideoBlock type
and add the same join directive as its sibling (e.g., `@join__field`(graph:
API_JOURNEYS_MODERN)) so ownership is explicit and request routing is
unambiguous.
🪄 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: 3dc3f8a7-ad24-4b53-a8e1-f7417d3ae820
📒 Files selected for processing (3)
apis/api-gateway/schema.graphqlapis/api-journeys-modern/schema.graphqlapis/api-journeys-modern/src/schema/block/card/cardBlockCreate.mutation.ts
✅ Files skipped from review due to trivial changes (1)
- apis/api-journeys-modern/src/schema/block/card/cardBlockCreate.mutation.ts
|
Merge conflict attempting to merge this into stage. Please fix manually. |
|
Found 1 test failure on Blacksmith runners: Failure
|

… updating input types
cardBlockCreateandcardBlockUpdatemutations fromapi-journeysschema.adminJourneyquery to align with modern API structure.DateTimeFilterinput type for better clarity and usage.Summary by CodeRabbit
New Features
Refactor