小编Muh*_*tov的帖子

如何在 Strapi、GraphQL 中的 where 子句中使用多个“and”条件进行查询?

现在我尝试在 Strapi GraphQL 游乐场中的位置内使用多个 _and 进行查询。我正在使用的查询是:

 {
  clients(
    where: {
      _and: [{ name: { _contains: "a" } }, { endDate: { _gte: "2017-12-31" } }]
    }
  ) {
    id
    name
    endDate
    reasonForEnding
  }
}
Run Code Online (Sandbox Code Playgroud)

但出现错误提示如下:

 "Error: Your filters contain a field '_and' that doesn't appear on your model definition nor it's relations".
Run Code Online (Sandbox Code Playgroud)

如何使用 GraphQL 在 Strapi 中使用多个 _and 条件 where 子句正确进行查询

where-clause apollo graphql strapi angular

5
推荐指数
1
解决办法
8172
查看次数

标签 统计

angular ×1

apollo ×1

graphql ×1

strapi ×1

where-clause ×1