import { useQuery } from '@tanstack/react-query';
import { fetchCodeGraph } from '@/api/code';

export function useCodeGraph(limit?: number) {
  return useQuery({
    queryKey: ['code', 'graph', { limit }],
    queryFn: () => fetchCodeGraph(limit),
  });
}
