Fix GraphQL validation error in Duo Agentic Chat
What does this MR do and why?
Fixes a GraphQL validation error that occurred when the Duo Agentic Chat component queried for configured agents. The resolver for aiCatalogConfiguredItems enforces an exactly_one_of validation requiring either projectId or groupId, but not both.
This MR updates the query variables to conditionally pass only one of these parameters, preferring projectId when available.
| before | after |
|---|---|
![]() |
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related issues
https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/issues/1404+
Steps to reproduce
- Visit search page:
http://127.0.0.1:3333/search?group_id=1000000&scope=blobs&search=test - Open chat. If this doesn't work you'll see error in the chat:
Error: One and only one of \[groupId, projectId\] arguments is required.
Error: GraphQL error: One and only one of \[groupId, projectId\] arguments is required.
I can't see it currently in my gdk but I do see it in the prod.
Edited by Tomas Bulva
