Skip to content

chore: radioquestionblockupdate modern#8985

Merged
mikeallisonJS merged 15 commits intomainfrom
26-00-MA-chore-radioquestionblockupdate-modern
Apr 13, 2026
Merged

chore: radioquestionblockupdate modern#8985
mikeallisonJS merged 15 commits intomainfrom
26-00-MA-chore-radioquestionblockupdate-modern

Conversation

@mikeallisonJS
Copy link
Copy Markdown
Collaborator

@mikeallisonJS mikeallisonJS commented Apr 8, 2026

Summary by CodeRabbit

  • New Features
    • Added new mutation operations for enhanced block management, including icon block updates and image block creation/updates.
    • Introduced radio block mutations for creating and updating radio option and question blocks.
    • Enhanced radio question block updates with support for parent block positioning and optional grid view configuration.

@mikeallisonJS mikeallisonJS requested a review from csiyang April 8, 2026 20:16
@mikeallisonJS mikeallisonJS self-assigned this Apr 8, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 8, 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: fe7a1101-7c20-4e6d-8076-63aeb5d3e707

📥 Commits

Reviewing files that changed from the base of the PR and between aa71b89 and 7995156.

📒 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 migrates the radioQuestionBlockUpdate GraphQL mutation from the API_JOURNEYS graph to API_JOURNEYS_MODERN within a federated schema architecture, adding the corresponding resolver implementation with authorization checks, database updates, and comprehensive test coverage. Additional mutations for icon and image block operations are also declared.

Changes

Cohort / File(s) Summary
Federation Schema Updates
apis/api-gateway/schema.graphql, apis/api-journeys-modern/schema.graphql
Updated API gateway routing to resolve radioQuestionBlockUpdate via API_JOURNEYS_MODERN with override directive; added federated mutation declarations for icon, image, and radio block operations in the modern graph.
RadioQuestionBlock Mutation Implementation
apis/api-journeys-modern/src/schema/block/radioQuestion/radioQuestionBlockUpdate.mutation.ts, apis/api-journeys-modern/src/schema/block/radioQuestion/radioQuestionBlockUpdate.mutation.spec.ts
Implemented resolver for radioQuestionBlockUpdate with authorization checks, Prisma transactional updates to block and journey entities, and comprehensive test coverage for authorized/unauthorized scenarios and optional field handling.
Module Imports
apis/api-journeys-modern/src/schema/block/radioQuestion/index.ts
Added imports for newly created radioQuestionBlockCreate and radioQuestionBlockUpdate mutations to register schema elements.

Sequence Diagram(s)

sequenceDiagram
    actor Client
    participant Gateway as API Gateway<br/>(Federation)
    participant Modern as API Journeys<br/>Modern
    participant Auth as Authorization<br/>Service
    participant DB as Database<br/>(Prisma)
    
    Client->>Gateway: radioQuestionBlockUpdate(id, parentBlockId, gridView)
    Gateway->>Modern: Route to API_JOURNEYS_MODERN
    Modern->>Auth: authorizeBlockUpdate(id, user)
    Auth->>DB: Query ACL/Permissions
    DB-->>Auth: ACL Result
    Auth-->>Modern: Authorization Result
    alt Authorized
        Modern->>DB: $transaction([block.update, journey.update])
        DB->>DB: Update block parentBlockId & gridView
        DB->>DB: Update journey metadata
        DB-->>Modern: Updated Block
        Modern-->>Gateway: RadioQuestionBlock
        Gateway-->>Client: Success with updated gridView
    else Unauthorized
        Modern-->>Gateway: Error: Forbidden
        Gateway-->>Client: Error Response
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • csiyang
🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'chore: radioquestionblockupdate modern' is vague and uses non-descriptive technical abbreviations without clearly communicating the purpose of the changes. Revise the title to be more descriptive and clear, such as 'chore: migrate radioQuestionBlockUpdate to modern API schema' or similar, to better convey the intent of the changeset.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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-chore-radioquestionblockupdate-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 Apr 8, 2026

View your CI Pipeline Execution ↗ for commit 1c8de49

Command Status Duration Result
nx run player-e2e:e2e ✅ Succeeded 4s View ↗
nx run watch-e2e:e2e ✅ Succeeded 24s View ↗
nx run journeys-admin-e2e:e2e ✅ Succeeded 30s View ↗
nx run journeys-e2e:e2e ✅ Succeeded 27s View ↗
nx run resources-e2e:e2e ✅ Succeeded 14s 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=jo... ✅ Succeeded 2s View ↗
Additional runs (20) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2026-04-13 19:23:17 UTC

@github-actions github-actions Bot requested a deployment to Preview - videos-admin April 8, 2026 20:18 Pending
@github-actions github-actions Bot requested a deployment to Preview - journeys April 8, 2026 20:19 Pending
@github-actions github-actions Bot requested a deployment to Preview - short-links April 8, 2026 20:19 Pending
@github-actions github-actions Bot requested a deployment to Preview - journeys-admin April 8, 2026 20:19 Pending
@github-actions github-actions Bot requested a deployment to Preview - resources April 8, 2026 20:19 Pending
@github-actions github-actions Bot temporarily deployed to Preview - journeys April 8, 2026 20:22 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - videos-admin April 8, 2026 20:23 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - short-links April 8, 2026 20:23 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin April 8, 2026 20:23 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - watch April 8, 2026 20:23 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - resources April 8, 2026 20:23 Inactive
@blacksmith-sh

This comment has been minimized.

@github-actions github-actions Bot temporarily deployed to Preview - resources April 10, 2026 18:54 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin April 10, 2026 18:54 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - videos-admin April 10, 2026 18:54 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - short-links April 10, 2026 18:54 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys April 10, 2026 18:54 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - watch April 10, 2026 18:54 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - player April 10, 2026 18:54 Inactive
@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!

1 similar comment
@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!

@stage-branch-merger
Copy link
Copy Markdown
Contributor

Merge conflict attempting to merge this into stage. Please fix manually.

1 similar comment
@stage-branch-merger
Copy link
Copy Markdown
Contributor

Merge conflict attempting to merge this into stage. Please fix manually.

@github-actions github-actions Bot temporarily deployed to Preview - videos-admin April 13, 2026 19:13 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - watch April 13, 2026 19:13 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - short-links April 13, 2026 19:13 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - resources April 13, 2026 19:13 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys April 13, 2026 19:13 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin April 13, 2026 19:13 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - player April 13, 2026 19:13 Inactive
@mikeallisonJS mikeallisonJS enabled auto-merge April 13, 2026 20:13
@mikeallisonJS mikeallisonJS added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit 4baa8bf Apr 13, 2026
38 checks passed
@mikeallisonJS mikeallisonJS deleted the 26-00-MA-chore-radioquestionblockupdate-modern branch April 13, 2026 20:18
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