Grafana 的 NodeGraph 结构

问题描述

我是 NodeGraph 的新手,正在尝试 Graphql 查询。我在 Grafana 中找不到节点图所需的正确示例结构。所以我无法弄清楚 NodeGraph 所需的结构,有人可以帮忙吗?下面分别是我的 Graphql 查询和响应。 我的 Graphql 查询

  data:exportNodeGraph(input: {nodeGraphType: TEMPLATE,id:1}) {   
    name
    fields {
      ... on GraphNodeField {
        id
        title
      }
      ... on GraphEdgeField {
        id
        source
        target
      }
    }
    frame {
      Meta {
        preferredVisualisationType
      } 
    }
  }
}

Response
{
  "data": {
    "exportNodeGraph": [
      {
        "name": "nodes","fields": [
          {
            "id": "1","title": "TITLE"
          },{
            "id": "2","title": "Sim-1"
          }
        ],"frame": {
          "Meta": {
            "preferredVisualisationType": "nodeGraph"
          }
        }
      },{
        "name": "edges","fields": [
          {
            "id": "1--2","source": "1","target": "2"
          },],"frame": {
          "Meta": {
            "preferredVisualisationType": "nodeGraph"
          }
        }
      }
    ]
  }
}```

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)