Expose flow metadata fields on DuoWorkflow GraphQL type

What does this MR do and why?

Exposes three new fields on the DuoWorkflow GraphQL type that surface flow information already stored in the flow_metadata_json column on the duo_workflows_workflows table (column added in !245481 (merged)):

  • flowMetadataVersion — the resolved flow version (e.g. 2.0.0)
  • flowMetadataId — the flow identifier (e.g. developer)
  • flowMetadataSchemaVersion — the flow metadata schema version (e.g. v1)

The flow_metadata_json column is populated by the duo_workflow_service when saving checkpoints (via CreateCheckpointService). This change makes the data accessible via the GraphQL API so it can be displayed in the session details UI.

References

How to set up and validate locally

  1. Switch to this branch and an up-to-date gitlab-ai-gateway in your GDK
  2. Run a developer flow
  3. Run the following GraphQL query in http://gdk.test:3000/-/graphql-explorer
query getFlowMetadataFields {
  duoWorkflowWorkflows(first: 1) {                                                                                                                                          
    nodes {                                                                                                                                                                 
      id      
      modelMetadataName
      modelMetadataIdentifier                                                                                                                                                              
      flowMetadataVersion                                                                                                                                                   
      flowMetadataId                                                                                                                                                        
      flowMetadataSchemaVersion                                                                                                                                             
    }                                                                                                                                                                       
  }                                                                                                                                                                         
}
  1. Confirm the flow metadata fields are present

Example output:

{
  "data": {
    "duoWorkflowWorkflows": {
      "nodes": [
        {
          "id": "gid://gitlab/Ai::DuoWorkflows::Workflow/4757",
          "modelMetadataName": "claude_sonnet_4_6_vertex",
          "modelMetadataIdentifier": null,
          "flowMetadataVersion": "2.0.0",
          "flowMetadataId": "developer",
          "flowMetadataSchemaVersion": "v1"
        }
      ]
    }
  },
  "correlationId": "01KYT19AN0ZGNR63PSQHY9AWXE"
}

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 Roman Eisner

Merge request reports

Loading
Loading