Backend: Expose agent versions in GraphQL
About
We want to expose agent versions in GraphQL.
Proposal
Because agent versions are part of a generic ItemVersion model, but do have a specific schema, we will need to use GraphQL interfaces to allow the frontend to select their properties:
{
aiCatalogItems {
nodes {
name
versions(first: 1) {
nodes {
id
...on AiCatalogAgentVersion {
privileges
userPrompt
systemPrompt
}
}
}
}
}
}
In this iteration the versions will not have any special filtering arguments.
In future, we could filter by a specific version numbers, or other states.
We could also in future add a version singular field that can be passed a version number or other state to return a single version, perhaps also a latestVersion field etc.
Edited by 🤖 GitLab Bot 🤖