现在我正在尝试在 Strapi GraphQL playground 中的 where 中使用多个 _and 进行查询。我正在使用的查询是:
{
clients(
where: {
_and: [{ name: { _contains: "a" } }, { endDate: { _gte: "2017-12-31" } }]
}
) {
id
name
endDate
reasonForEnding
}
}
但是出现以下错误:
"Error: Your filters contain a field '_and' that doesn't appear on your model definition nor it's relations".
如何在带有 GraphQL 的 Strapi 中使用多个 _and 条件 where 子句进行正确查询
最佳答案
clients(
where: {
and: [{ name: { contains: "a" } }, { endDate: { gte: "2017-12-31" } }]
}
) {
id
name
endDate
reasonForEnding
}
这就是答案
关于angular - 如何在 Strapi、GraphQL 的 where 子句中使用多个 'and' 条件进行查询?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65420524/