Express API server wrapping existing store/graph core with REST endpoints for nodes, edges, graph, and search. React + Vite portal with React Flow for interactive graph visualization, Tailwind CSS styling, and full CRUD UI (sidebar, node panel, add/link modals, search bar, toast notifications).
10 lines
256 B
TypeScript
10 lines
256 B
TypeScript
import { useQuery } from '@tanstack/react-query';
|
|
import { api } from '../api';
|
|
|
|
export function useNodes(params?: { kind?: string; status?: string }) {
|
|
return useQuery({
|
|
queryKey: ['nodes', params],
|
|
queryFn: () => api.listNodes(params),
|
|
});
|
|
}
|