import request from '@/utils/request'

// 获取知识图谱数据
export function getGraphData() {
  return request({
    url: '/flood/graph/data',
    method: 'get'
  })
}

// 获取所有知识图谱列表
export function getAllGraphs() {
  return request({
    url: '/flood/graph/list',
    method: 'get'
  })
}

// 根据图谱标识获取特定图谱数据
export function getGraphDataByKey(graphKey) {
  return request({
    url: '/flood/graph/data/byKey',
    method: 'get',
    params: {
      graphKey: graphKey || 'all'
    }
  })
}

// 查询节点详情
export function getNodeInfo(nodeId) {
  return request({
    url: '/flood/graph/node/' + nodeId,
    method: 'get'
  })
}

// 获取Neo4j Browser URL
export function getNeo4jBrowserUrl() {
  return request({
    url: '/flood/graph/browserUrl',
    method: 'get'
  })
}
