Skip to content

Add AI catalog search (and expose via GraphQL)

What does this MR do and why?

Related to #555554

We need a way to search for catalog items. This MR adds the search and exposes it via GraphQL

References

Screenshots or screen recordings

image

How to set up and validate locally

  1. Enable :global_ai_catalog feature flag
  2. Create some agents (and take note of the id):
     mutation m {
       aiCatalogAgentCreate(input: {
         name: "Agent 1"
         description: "The best agent ever"
         projectId: "gid://gitlab/Project/1000000"
         systemPrompt: "Hello"
         userPrompt: "World"
         public: true
       }) {
         errors
         item {
           id
         }
       }
     }
  3. Search in GraphQL explorer:
     {
       aiCatalogItems(
         search: "best"
       ) {
         count
         pageInfo {
           endCursor
           hasNextPage
         }
         nodes {
           id     
           itemType
           name
           description
         }
       }
     }

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Lee Tickett

Merge request reports

Loading