Fully autonomous AI Agents system capable of performing complex penetration testing tasks
Go ai-agentsai-security-toolanthropicautonomous-agentsgolanggptgraphqlmulti-agent-systemoffensive-securityopen-sourceopenaipenetration-testingpenetration-testing-toolsreactsecurity-automationsecurity-testingsecurity-toolsself-hosted
fix(knowledge): preserve document content when list query writes empty body
Sergey Kozyrenko8bd6c72f6309
diff --git a/frontend/src/lib/apollo.ts b/frontend/src/lib/apollo.tsindex 55c484c1..9e1d0e5d 100644--- a/frontend/src/lib/apollo.ts+++ b/frontend/src/lib/apollo.ts@@ -463,6 +463,17 @@ const createApolloClient = () => {APIToken: {keyFields: ['tokenId'],},+ KnowledgeDocument: {+ fields: {+ // `content` arrives empty from the list query (withContent:false,+ // to save bandwidth) but full from the detail query — both+ // normalize to this shared entity. Never let an empty incoming+ // blank out a body the detail already loaded.+ content: {+ merge: (existing: string | undefined, incoming: string) => incoming || existing || '',+ },+ },+ },ProviderConfig: {keyFields: (object) => {if (object.id === 0 || object.id === '0') {