Refactor graph search and add local Vite config.

- Simplify graph search parameters in API
- Add inclusive search and min degree options
- Update Vite config for local development
- Enhance graph query endpoint in web UI
- Add new Vite config file for local setup
This commit is contained in:
yangdx
2025-03-05 10:39:27 +08:00
parent 002948d342
commit d52b6bead1
5 changed files with 53 additions and 46 deletions

View File

@@ -161,8 +161,12 @@ axiosInstance.interceptors.response.use(
)
// API methods
export const queryGraphs = async (label: string, maxDepth: number): Promise<LightragGraphType> => {
const response = await axiosInstance.get(`/graphs?label=${label}&max_depth=${maxDepth}`)
export const queryGraphs = async (
label: string,
maxDepth: number,
inclusive: boolean = false
): Promise<LightragGraphType> => {
const response = await axiosInstance.get(`/graphs?label=${encodeURIComponent(label)}&max_depth=${maxDepth}&inclusive=${inclusive}`)
return response.data
}