过滤图QL查询以排除空结果

时间:2020-02-10 22:52:50

标签: null graphql

我有这个查询:

{standards(effectiveDate:"7/1/2020"){
  std_id
  elementofPerformance(effectiveDate:"7/1/2020", mc_id:54311){
    mc_id

    }
  }
}

返回以下部分结果:

 "data": {
    "standards": [
      {
        "std_id": 13320,
        "elementofPerformance": [
          {
            "mc_id": 54311
          }
        ]
      },
      {
        "std_id": 13321,
        "elementofPerformance": []
      },

正如您所看到的,我得到的结果的空白的elementofPerformance列表-不存在的标准记录和mc_id = 54311的elementofPerformance仍然显示。如何编写查询以排除这些查询?

0 个答案:

没有答案