Skip to content

feat: expose userId field on IntegrationGoogle GraphQL type (NES-1492)#8967

Merged
jianwei1 merged 3 commits intomainfrom
jianweichong/nes-1492-expose-userid-on-integration-google
Apr 7, 2026
Merged

feat: expose userId field on IntegrationGoogle GraphQL type (NES-1492)#8967
jianwei1 merged 3 commits intomainfrom
jianweichong/nes-1492-expose-userid-on-integration-google

Conversation

@jianwei1
Copy link
Copy Markdown
Contributor

@jianwei1 jianwei1 commented Apr 7, 2026

Summary

  • Exposes userId (Firebase UID) as a scalar field on IntegrationGoogle in both api-journeys and api-journeys-modern
  • Consistent with 10+ other types that already expose userId (UserJourney, UserRole, JourneyProfile, etc.)
  • Enables the frontend to filter integrations by authenticated user without relying on the federated User entity, which resolves to a different ID format (Prisma UUID vs Firebase UID)
  • No breaking changes — additive only, no existing queries are affected

Context

This is part 1 of 2 for NES-1492. The frontend PR (#8958) depends on this being deployed first.

Test plan

  • Verify userId field is queryable on IntegrationGoogle via GraphQL
  • Verify existing integrations query continues to work without changes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added userId field to Google Integration objects.
    • Added notes field to VideoBlock for template adapters reference.
  • Schema Updates

    • Reorganized CardBlock mutations across API implementations for improved structure.

Exposes the Firebase UID stored on Integration.userId as a scalar
field on IntegrationGoogle, consistent with 10+ other types that
already expose userId (UserJourney, UserRole, JourneyProfile, etc.).

This enables frontend consumers to filter integrations by the
authenticated user without relying on the federated User entity,
which resolves to a different ID format (Prisma UUID).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@linear
Copy link
Copy Markdown

linear Bot commented Apr 7, 2026

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 7, 2026

Walkthrough

The PR reorganizes GraphQL schemas across API services, relocating the cardBlockCreate mutation from API_JOURNEYS to API_JOURNEYS_MODERN, adding a userId field to IntegrationGoogle type in multiple services, and removing legacy cardBlockCreate mutation from the older API_JOURNEYS schema.

Changes

Cohort / File(s) Summary
API Gateway Schema Reorganization
apis/api-gateway/schema.graphql
Moved cardBlockCreate mutation to API_JOURNEYS_MODERN, reordered VideoBlock fields (notes and mediaVideo), relocated CardBlockCreateInput input type to API_JOURNEYS_MODERN only, and added userId: ID field to IntegrationGoogle.
API Journeys Modern Implementation
apis/api-journeys-modern/schema.graphql, apis/api-journeys-modern/src/schema/integration/google/google.ts
Added userId: ID optional field to IntegrationGoogle type in schema and exposed it via t.exposeID() in TypeScript implementation.
API Journeys Legacy Schema
apis/api-journeys/schema.graphql, apis/api-journeys/src/app/modules/integration/google/google.graphql
Removed cardBlockCreate mutation and CardBlockCreateInput input type, added notes: String field to VideoBlock, and added userId: ID field to IntegrationGoogle in both schema and implementation files.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 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 PR title accurately summarizes the main change: exposing a userId field on IntegrationGoogle, which is the primary focus across all modified files.
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 jianweichong/nes-1492-expose-userid-on-integration-google

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

View your CI Pipeline Execution ↗ for commit 5604dc9

Command Status Duration Result
nx run journeys-admin-e2e:e2e ✅ Succeeded 32s View ↗
nx run watch-e2e:e2e ✅ Succeeded 24s View ↗
nx run journeys-e2e:e2e ✅ Succeeded 27s View ↗
nx run player-e2e:e2e ✅ Succeeded 3s View ↗
nx run resources-e2e:e2e ✅ Succeeded 19s View ↗
nx run videos-admin-e2e:e2e ✅ Succeeded 4s View ↗
nx run short-links-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-04-07 04:40:38 UTC

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

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@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 - journeys April 7, 2026 04:29 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - resources April 7, 2026 04:29 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - player April 7, 2026 04:29 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - videos-admin April 7, 2026 04:29 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - short-links April 7, 2026 04:29 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin April 7, 2026 04:29 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - watch April 7, 2026 04:29 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
player ✅ Ready player preview Tue Apr 7 16:34:54 NZST 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
short-links ✅ Ready short-links preview Tue Apr 7 16:34:59 NZST 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
videos-admin ✅ Ready videos-admin preview Tue Apr 7 16:35:42 NZST 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
journeys ✅ Ready journeys preview Tue Apr 7 16:34:46 NZST 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
resources ✅ Ready resources preview Tue Apr 7 16:36:05 NZST 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
journeys-admin ✅ Ready journeys-admin preview Tue Apr 7 16:37:25 NZST 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
watch ✅ Ready watch preview Tue Apr 7 16:35:58 NZST 2026

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

🧹 Nitpick comments (1)
apis/api-gateway/schema.graphql (1)

1848-1848: Consider documenting the identifier format on userId.

Line 1848 now sits next to user: User, but those IDs come from different domains (Firebase UID vs federated user UUID). A short field description in the source subgraph schema would make that distinction obvious to clients.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apis/api-gateway/schema.graphql` at line 1848, Add a short GraphQL field
description/comment for the userId field to clarify which identifier format it
holds (e.g., Firebase UID vs federated user UUID) since it sits next to user:
User and the two come from different domains; update the schema entry for userId
to include that descriptive text so clients know which ID to supply/expect and
which system it originates from.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apis/api-gateway/schema.graphql`:
- Line 1848: Add a short GraphQL field description/comment for the userId field
to clarify which identifier format it holds (e.g., Firebase UID vs federated
user UUID) since it sits next to user: User and the two come from different
domains; update the schema entry for userId to include that descriptive text so
clients know which ID to supply/expect and which system it originates from.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9455e62c-c99c-4695-b7a2-4e40eb9f806f

📥 Commits

Reviewing files that changed from the base of the PR and between 74dc141 and 5604dc9.

⛔ Files ignored due to path filters (3)
  • apis/api-journeys/src/__generated__/graphql.ts is excluded by !**/__generated__/**
  • apis/api-journeys/src/app/__generated__/graphql.ts is excluded by !**/__generated__/**
  • libs/shared/gql/src/__generated__/graphql-env.d.ts is excluded by !**/__generated__/**
📒 Files selected for processing (5)
  • apis/api-gateway/schema.graphql
  • apis/api-journeys-modern/schema.graphql
  • apis/api-journeys-modern/src/schema/integration/google/google.ts
  • apis/api-journeys/schema.graphql
  • apis/api-journeys/src/app/modules/integration/google/google.graphql

@jianwei1 jianwei1 added this pull request to the merge queue Apr 7, 2026
Merged via the queue into main with commit 937ede2 Apr 7, 2026
37 of 39 checks passed
@jianwei1 jianwei1 deleted the jianweichong/nes-1492-expose-userid-on-integration-google branch April 7, 2026 04:44
tanflem pushed a commit that referenced this pull request Apr 13, 2026
#8967)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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