I am working on a project using the strapi-plugin-graphql package.
I am trying to set up a query that filters on multiple fields, using the where parameter. If I pass multiple props into the where clause, I get results that only match to both queries.
Is there an out of the box way to implement this as an OR so matches to either of the conditions are returned? Or would this require writing a custom resolver?
actually, I dunno if it’s totally related now to GraphQL.
I replaced these GraphQL queries with conventional rest endpoints, and I am still getting the same error as I was with Apollo.
I am trying examples from this complex queries documentation but both the implicit and the explicit OR syntax also return only filters that match to all query params (implicit AND).
I am trying to do a combination of deep and complex filtering with the graphql plugin. I can get one or the other to work but not both. In the docs on the content API page and complex queries section there is a subsection “Combining AND and OR operators” that suggests this very thing is possible but when I try to run a query that is like the example shown (with an implicit AND) it returns the graphQLError - “Your filters contain a field ‘0.field1’ that doesn’t appear on your model definition nor it’s relations”
if try updating the query to use an explicit AND (shown below) I get this graphQLError - “Your filters contain a field ‘_and’ that doesn’t appear on your model definition nor it’s relations”
Is it possible to nest complex queries like this using the graphql plugin or should I find another way of doing this? The docs defintely suggest it is possible but the example they show in the above mentioned docs section is using the REST API.