scaphold-io / scaphold-issues

Post issues that you find on Scaphold here. Post anything about the platform, docs, boilerplates, etc... Happy Scapholding!
3 stars 0 forks source link

Is there a bug in AND w/ nested filters? #28

Open brandonmp opened 7 years ago

brandonmp commented 7 years ago

A bit of a pain to recreate, so you can query against my endpoint to see behavior if you want

I've observed it in a few instances like this. in general when i try to do an AND query and one of the whereArgs involves a connection, that whereArg doesn't seem to apply

eg, this query looks for all ListingRatings that were created after a certain date AND created by a user without my domain in their email address (wayhome.io)

The date filter works fine, but the email filter doesn't seem to do anything

// query
query getListing($where: ListingRatingWhereArgs!) {
  viewer {
    allListingRatings(where: $where) {
     edges {
        node {
         user {
            emailAddress
          }
          rating
        }
      }
    }
  }
}
// vars
{
    "where": {
    "AND": [
      {
        "createdAt": {
            "gt": "2017-04-24T03:24:34.429Z"
        }
      },
      {
        "user": {
          "emailAddress": {
            "notLike": "%wayhome.io%"
          }
        }
      }
    ]

}
}