strawberry-django icon indicating copy to clipboard operation
strawberry-django copied to clipboard

lookups doesn't accept null

Open devkral opened this issue 2 years ago • 0 comments

when defining a query filter like:

query {
  users(filter: {username: {contains: null}}){
  }
}

the query fails with with: "Cannot use None as a query value" except for some filters like exact. And for exact this is a spec violation:

filters shall accept Unset or None to not filter

This bug causes errors when testing with schemathesis. PR follows

System Information

  • Strawberry version (if applicable): 0.29

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

devkral avatar Jan 25 '24 10:01 devkral