import request from './request'

export function parseLineage(sql: string, targetTable: string) {
  return request.post('/lineage/parse', null, { params: { sql, target_table: targetTable } })
}

export function getLineageGraph(tableName?: string) {
  return request.get('/lineage/graph', { params: tableName ? { table_name: tableName } : undefined })
}
