'How to query with multiple 'and' conditions in where clause in Strapi, GraphQL?
Now I am trying to query with multiple _and inside where in Strapi GraphQL playground. The query I am using is:
 {
  clients(
    where: {
      _and: [{ name: { _contains: "a" } }, { endDate: { _gte: "2017-12-31" } }]
    }
  ) {
    id
    name
    endDate
    reasonForEnding
  }
}
But getting an error with says the following:
 "Error: Your filters contain a field '_and' that doesn't appear on your model definition nor it's relations".
How to do properly query with multiple _and conditions where clause in Strapi with GraphQL
Solution 1:[1]
clients(
  where: {
    and: [{ name: { contains: "a" } }, { endDate: { gte: "2017-12-31" } }]
  }
) {
    id
    name
    endDate
    reasonForEnding
  }
This is the answer
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source | 
|---|---|
| Solution 1 | J.dev | 
