Move document type from document to document version
Follow the same pattern used for classification: document type now lives exclusively on DocumentVersion. A migration copies existing values from documents to their versions. The document filter uses a subquery on the latest version. All three API surfaces (GraphQL, MCP, CLI), resolvers, frontend, and e2e tests are updated accordingly. Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -2095,7 +2095,6 @@ func (r *Resolver) UpdateDocumentTool(ctx context.Context, req *mcp.CallToolRequ
|
||||
probo.UpdateDocumentRequest{
|
||||
DocumentID: input.ID,
|
||||
Title: input.Title,
|
||||
DocumentType: input.DocumentType,
|
||||
TrustCenterVisibility: input.TrustCenterVisibility,
|
||||
},
|
||||
)
|
||||
@@ -2201,6 +2200,7 @@ func (r *Resolver) UpdateDocumentVersionTool(ctx context.Context, req *mcp.CallT
|
||||
ID: input.DocumentVersionID,
|
||||
Content: content,
|
||||
Classification: input.Classification,
|
||||
DocumentType: input.DocumentType,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user