AND filter on query

Hey there,

I’m currently trying to figure out if the DatoAPI supports the AND-operator on filters?
In other GraphQL tutorials I see that the same way the OR-operator works, there should be an AND-operator: https://grandstack.io/docs/graphql-filtering/#logical-operators-and-or

But in reality the API tells me InputObject 'ShoeModelFilter' doesn't accept argument 'AND'.

In my use case I have a field on a record which specifies a certain “category”, let’s say the available categories are: Coming Soon, In Stock, Countdown, Sold Out
I want to query all records, which are not Coming Soon and not In Stock.
So every record that would have Countdown set, or Sold Out set etc.
If I use the OR-operator, obv. this won’t work since a record with Coming Soon would match the neq: "In Stock" filter and vice versa.

The filter I tried to use is:

AND: [
        {shoeShowInReleases: {eq: "true"}},
        {releaseStatus: {neq: "Coming Soon"}},
        {releaseStatus: {neq: "Countdown"}}
      ]

Does the API really not support the AND-operator? And is there a good reason for it? I think this is quite a needed feature for an API.

Thanks for a heads up into the right direction.

Stay Safe!

hello @heat-mvmnt

the Content Delivery API supports both AND and OR in the filters.

Have a look at the beginning of this page: https://www.datocms.com/docs/content-delivery-api/filtering-records there are examples for both cases. Does that helps?