AND filter ignores return value of its child



I have this query but the return value of

{categories_some: {id: $categoryId}}

is being ignored… If I query {categories_some: {id: $categoryId}} alone - it returns me no results (because there are not any) so thats correct. But when I put there the OR filter, it returns me values that are valid by the OR filter and the categories_some filter is being ignored…

 where: {
    AND: [
      {OR: [
        {title_contains: $search}, 
        {description_contains: $search}
      {categories_some: {id: $categoryId}}, 


Hey @Jan_Burda, thanks for bringing this up here! :slight_smile:

Can you share more information? Ideally as a new GitHub repository that includes the following:

  • a prisma.yml file that is ready to be deployed
    • please configure the datamodel and seed properties in this file appropriately, so that deploying will result in a data model and data set that exhibits the described behavior
    • please leave out the endpoint property, so someone looking at the reproduction can deploy where they wish
  • the exact query + variables you run, as well as the actual and the expected output
  • a step-by-step list to reproduce this error based on the above

Thanks! :slight_smile: