Conversation
- Introduced the AuthenticatedUser type in both API schemas, enhancing user data representation. - Implemented a resolver for AuthenticatedUser to handle user retrieval and fallback for missing first names. - Updated user object exports to include AuthenticatedUser for better federation support.
- Added the AuthenticatedUser type to the API schemas, including fields for user details. - Extended the AuthenticatedUser type to support federation with external services. - Updated generated TypeScript definitions to reflect the new structure of AuthenticatedUser. - Modified user-related GraphQL operations to incorporate the new AuthenticatedUser type.
- Updated the AuthenticatedUser type in the API schemas to include federation capabilities with the API_JOURNEYS_MODERN graph. - Introduced a new external reference for AuthenticatedUser in the user schema to facilitate integration. - Modified TypeScript exports to include the new AuthenticatedUser reference for improved type handling.
- Deleted the AuthenticatedUser type definition from the GraphQL schema to streamline user data representation. - This change simplifies the API by removing unnecessary complexity related to user authentication details.
- Added languageUserRoles field to the AuthenticatedUser type in both schema.graphql and schema.graphql for API_LANGUAGES. - Implemented resolver for languageUserRoles in the user schema to fetch user-specific language roles from the database. - This update improves the user model by integrating language role management into the authentication process.
- Added mediaUserRoles field to the AuthenticatedUser type in both schema.graphql files for API_MEDIA. - Implemented resolver for mediaUserRoles in the user schema to fetch user-specific media roles from the database. - Updated TypeScript exports to include the new AuthenticatedUser reference for better type management.
WalkthroughAdds a federated AuthenticatedUser entity across the gateway and multiple subgraphs (API_JOURNEYS, API_JOURNEYS_MODERN, API_LANGUAGES, API_MEDIA, API_USERS), adds role enums, and surfaces role fields and external refs with resolvers in language/media services. Changes
Sequence Diagram(s)sequenceDiagram
rect rgba(0,128,255,0.5)
participant Client
end
rect rgba(0,200,120,0.5)
participant Gateway
end
rect rgba(200,100,0,0.5)
participant API_USERS
participant API_LANGUAGES
participant API_MEDIA
end
Client->>Gateway: request AuthenticatedUser { id, roles, profile }
Gateway->>API_USERS: _entities(query: [{ __typename: "AuthenticatedUser", id }]) -> basic user fields
API_USERS-->>Gateway: returns id, profile fields (firstName, email, ...)
Gateway->>API_LANGUAGES: fetch languageUserRoles for id
API_LANGUAGES-->>Gateway: returns languageUserRoles[]
Gateway->>API_MEDIA: fetch mediaUserRoles for id
API_MEDIA-->>Gateway: returns mediaUserRoles[]
Gateway-->>Client: merged AuthenticatedUser { id, profile, languageUserRoles, mediaUserRoles }
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 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 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 |
|
View your CI Pipeline Execution ↗ for commit ab487e0
☁️ Nx Cloud last updated this comment at |
|
View your CI Pipeline Execution ↗ for commit ab487e0
☁️ Nx Cloud last updated this comment at |
|
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.
|
Summary by CodeRabbit