Skip to content

feat: update iconBlockCreate mutation to use modern API and import ne…#8883

Merged
mikeallisonJS merged 22 commits intomainfrom
26-00-MA-refactor-iconblockcreate-modern
Mar 25, 2026
Merged

feat: update iconBlockCreate mutation to use modern API and import ne…#8883
mikeallisonJS merged 22 commits intomainfrom
26-00-MA-refactor-iconblockcreate-modern

Conversation

@mikeallisonJS
Copy link
Copy Markdown
Collaborator

@mikeallisonJS mikeallisonJS commented Mar 19, 2026

…w mutation file

Summary by CodeRabbit

  • New Features
    • Icon blocks can now be created in journeys.
    • Card blocks can now be updated in journeys.

mikeallisonJS and others added 6 commits March 13, 2026 23:23
- Moved `buttonBlockUpdate` mutation to the modern API schema and adjusted its input type.
- Updated `cardBlockCreate` mutation to use the modern API.
- Removed deprecated `journeyId` parameter from `buttonBlockUpdate` in the legacy schema.
- Cleaned up related resolver and input files for consistency and clarity.
…for modern API

- Removed the `cardBlockCreate` mutation from the legacy API and adjusted related resolver tests.
- Updated the `cardBlockUpdate` mutation to include the `journeyId` parameter in the modern API schema.
- Cleaned up input types and resolver files for consistency across APIs.
- Eliminated the `CardBlockCreateInput` type from the resolver and related test files.
- Streamlined the `card.resolver.ts` and `card.resolver.spec.ts` for improved clarity and consistency.
- Changed the `cardBlockUpdate` mutation in both legacy and modern API schemas to make the return type non-nullable.
- Updated the `journeyId` parameter in the `cardBlockUpdate` mutation to be non-nullable in the modern API schema.
- Ensured consistency across API schemas by aligning mutation definitions.
@mikeallisonJS mikeallisonJS requested a review from csiyang March 19, 2026 21:31
@mikeallisonJS mikeallisonJS self-assigned this Mar 19, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 19, 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: 03a9489b-88e6-4670-af32-8f535cace703

📥 Commits

Reviewing files that changed from the base of the PR and between 85b5ac4 and 87d3a8e.

📒 Files selected for processing (1)
  • apis/api-gateway/schema.graphql
🚧 Files skipped from review as they are similar to previous changes (1)
  • apis/api-gateway/schema.graphql

Walkthrough

The pull request updates the GraphQL federation routing of the iconBlockCreate mutation to the API_JOURNEYS_MODERN subgraph, adds corresponding schema declarations and implementations for icon block creation and card block update mutations, including authorization checks, parent block validation, Prisma transaction handling, and comprehensive test coverage.

Changes

Cohort / File(s) Summary
Federation Schema Routing
apis/api-gateway/schema.graphql
Updated iconBlockCreate mutation routing from API_JOURNEYS to API_JOURNEYS_MODERN with api-journeys override annotation, directing resolution to the modern journeys subgraph.
Modern Journeys Schema
apis/api-journeys-modern/schema.graphql
Added two new mutation declarations: cardBlockUpdate for updating existing card blocks and iconBlockCreate for creating new icon blocks, both with @override(from: "api-journeys") federation directives.
Icon Block Mutation Implementation
apis/api-journeys-modern/src/schema/block/icon/iconBlockCreate.mutation.ts, apis/api-journeys-modern/src/schema/block/icon/index.ts
Implemented the iconBlockCreate GraphQL mutation resolver with authentication enforcement, authorization validation, parent block existence verification, and Prisma transaction management for atomic block and journey creation/update operations.
Icon Block Mutation Tests
apis/api-journeys-modern/src/schema/block/icon/iconBlockCreate.mutation.spec.ts
Added comprehensive Jest test suite covering successful icon block creation with and without optional fields, authorization denial errors, and missing parent block resolution errors, with mocked Prisma transaction behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 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 the main change: updating iconBlockCreate mutation to use modern API and importing a new mutation file, which aligns with the core changes across the schema files and implementation.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 26-00-MA-refactor-iconblockcreate-modern

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 Mar 19, 2026

View your CI Pipeline Execution ↗ for commit 9d6baee

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

☁️ Nx Cloud last updated this comment at 2026-03-24 21:40:48 UTC

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Mar 19, 2026

View your CI Pipeline Execution ↗ for commit 8435fed

Command Status Duration Result
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-03-19 21:38:10 UTC

@github-actions github-actions Bot requested a deployment to Preview - videos-admin March 19, 2026 21:33 Pending
@github-actions github-actions Bot temporarily deployed to Preview - short-links March 19, 2026 21:33 Inactive
@github-actions github-actions Bot requested a deployment to Preview - journeys March 19, 2026 21:33 Pending
@github-actions github-actions Bot temporarily deployed to Preview - player March 19, 2026 21:33 Inactive
@github-actions github-actions Bot requested a deployment to Preview - resources March 19, 2026 21:33 Pending
@github-actions github-actions Bot requested a deployment to Preview - journeys-admin March 19, 2026 21:33 Pending
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 19, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
short-links ✅ Ready short-links preview Wed Mar 25 10:36:59 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 19, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
player ✅ Ready player preview Wed Mar 25 10:36:19 NZDT 2026

@github-actions github-actions Bot temporarily deployed to Preview - short-links March 19, 2026 21:38 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - resources March 19, 2026 21:38 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys March 19, 2026 21:38 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - player March 19, 2026 21:38 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin March 19, 2026 21:38 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - watch March 19, 2026 21:38 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - videos-admin March 19, 2026 21:38 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 19, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
videos-admin ✅ Ready videos-admin preview Wed Mar 25 10:36:40 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 19, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
journeys ✅ Ready journeys preview Wed Mar 25 10:37:08 NZDT 2026

@github-actions github-actions Bot temporarily deployed to Preview - resources March 23, 2026 23:10 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin March 23, 2026 23:10 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - videos-admin March 23, 2026 23:10 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys March 23, 2026 23:10 Inactive
@blacksmith-sh

This comment has been minimized.

@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!

@github-actions github-actions Bot temporarily deployed to Preview - short-links March 24, 2026 21:22 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - resources March 24, 2026 21:22 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - watch March 24, 2026 21:22 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys March 24, 2026 21:22 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin March 24, 2026 21:22 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - videos-admin March 24, 2026 21:22 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - player March 24, 2026 21:22 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - player March 24, 2026 21:34 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - watch March 24, 2026 21:34 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - resources March 24, 2026 21:34 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - videos-admin March 24, 2026 21:34 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys March 24, 2026 21:34 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - short-links March 24, 2026 21:34 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin March 24, 2026 21:34 Inactive
@mikeallisonJS mikeallisonJS enabled auto-merge March 24, 2026 22:08
@mikeallisonJS mikeallisonJS added this pull request to the merge queue Mar 25, 2026
Merged via the queue into main with commit d0fa49f Mar 25, 2026
38 checks passed
@mikeallisonJS mikeallisonJS deleted the 26-00-MA-refactor-iconblockcreate-modern branch March 25, 2026 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants