@@ -20,7 +20,7 @@ RETURN nodes, rels`;
2020const pureDocument = `
2121MATCH (d:Document {status:'Completed'})
2222WITH d ORDER BY d.createdAt DESC
23- LIMIT 10
23+ LIMIT 5
2424MATCH docs=(d)<-[:PART_OF]-(c:Chunk)
2525WITH docs,
2626collect { MATCH p=(c)-[:NEXT_CHUNK]-() RETURN p } as chain,
@@ -34,7 +34,7 @@ RETURN nodes, rels
3434const docEntitiesGraph = `
3535MATCH (d:Document {status:'Completed'})
3636WITH d ORDER BY d.createdAt DESC
37- LIMIT 10
37+ LIMIT 5
3838MATCH docs=(d)<-[:PART_OF]-(c:Chunk)
3939WITH docs, collect { OPTIONAL MATCH p=(c:Chunk)-[:HAS_ENTITY]->(e)--(:!Chunk) RETURN p } as entities,
4040collect { MATCH p=(c)-[:NEXT_CHUNK]-() RETURN p } as chain,
@@ -47,7 +47,7 @@ RETURN nodes, rels`;
4747const knowledgeGraph = `
4848MATCH (d:Document {status:'Completed'})
4949WITH d ORDER BY d.createdAt DESC
50- LIMIT 10
50+ LIMIT 5
5151MATCH (d)<-[:PART_OF]-(c:Chunk)
5252WITH
5353collect { OPTIONAL MATCH p=(c)-[:HAS_ENTITY]->(e)--(:!Chunk) RETURN p } as entities
@@ -172,7 +172,7 @@ const GraphViewModal: React.FunctionComponent<GraphViewModalProps> = ({
172172 }
173173 } ) ;
174174
175- const newNodes = neo4jNodes . map ( ( n :any ) => {
175+ const newNodes = neo4jNodes . map ( ( n : any ) => {
176176 return {
177177 id : n . elementId ,
178178 size : getSize ( n ) ,
@@ -249,8 +249,9 @@ const GraphViewModal: React.FunctionComponent<GraphViewModalProps> = ({
249249 }
250250 } )
251251 . catch ( ( error : any ) => {
252+ setLoading ( false ) ;
252253 setStatus ( 'danger' ) ;
253- setStatusMessage ( error ) ;
254+ setStatusMessage ( error . message ) ;
254255 } ) ;
255256 }
256257 } , [ open , graphType ] ) ;
0 commit comments