@@ -8,6 +8,7 @@ import { Tooltip } from 'bootstrap';
88
99import { GraphContext } from "../lib/context" ;
1010import { useNotifications } from "../lib/notifications" ;
11+ import { API_ENDPOINTS } from "../lib/config" ;
1112import { ANIMATION_DURATION } from "../lib/consts" ;
1213import { Coordinates } from "sigma/types" ;
1314
@@ -108,7 +109,7 @@ const GraphRAGPanel: FC = () => {
108109 try {
109110 const sessionId = sessionStorage . getItem ( 'graphrag_session_id' ) || '' ;
110111 if ( sessionId ) {
111- const response = await fetch ( '/api/graphrag-cleanup' , {
112+ const response = await fetch ( API_ENDPOINTS . GRAPHRAG_CLEANUP , {
112113 method : 'POST' ,
113114 headers : {
114115 'Content-Type' : 'application/json' ,
@@ -264,7 +265,7 @@ const GraphRAGPanel: FC = () => {
264265 const checkBackendHealth = async ( ) => {
265266 if ( graphragState . isReady ) {
266267 try {
267- const response = await fetch ( 'http://localhost:5002/api/graphrag-health' , {
268+ const response = await fetch ( API_ENDPOINTS . GRAPHRAG_HEALTH , {
268269 method : 'GET' ,
269270 headers : {
270271 'Content-Type' : 'application/json' ,
@@ -613,7 +614,7 @@ const GraphRAGPanel: FC = () => {
613614 const sessionId = `graphrag_${ Date . now ( ) } _${ Math . random ( ) . toString ( 36 ) . substr ( 2 , 9 ) } ` ;
614615 sessionStorage . setItem ( 'graphrag_session_id' , sessionId ) ;
615616
616- const response = await fetch ( 'http://localhost:5002/api/graphrag-setup' , {
617+ const response = await fetch ( API_ENDPOINTS . GRAPHRAG_SETUP , {
617618 method : 'POST' ,
618619 headers : {
619620 'Content-Type' : 'application/json' ,
@@ -707,7 +708,7 @@ const GraphRAGPanel: FC = () => {
707708 updateState ( { messages : newMessages } ) ;
708709
709710 try {
710- const response = await fetch ( "/api/graphrag" , {
711+ const response = await fetch ( API_ENDPOINTS . GRAPHRAG_QUERY , {
711712 method : "POST" ,
712713 headers : {
713714 "Content-Type" : "application/json" ,
0 commit comments