import httpClient from "@/services/httpClient";
import type { Response } from "@/types/response.types";
import * as urlHelper from "@/libs/url.lib"
import type { SubjectNode, Request } from "@/types/knowledgeGraph.types";

const _url = urlHelper.withPrefix("/gw/search/knowledgeGraph");

export async function find(request: Request): Promise<SubjectNode[]> {
  const resp = await httpClient.post<Response<SubjectNode[]>>(_url("/find"), request)
  return resp.data.data
}
