You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

API Platform中ExistsFilter的GraphQL参数化配置报错求助

问题解决

错误出在变量的类型定义上:

  • 你把$exists的类型定义成了数组类型[AccountFilter_exists],但API平台生成的AccountFilter_exists本身就是对象类型,用来接收{firstName: true}这样的键值对。

修正后的查询:

query getAccounts($exists: AccountFilter_exists) {
  accounts(exists: $exists) {
    edges {
      node {
        id
      }
    }
  }
}

参数保持原配置即可:

{
  "exists": {"firstName": true}
}

调整后变量类型与传入的对象值匹配,就能正常执行查询了。

内容的提问来源于stack exchange,提问作者user1678586

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.13 00:55:28