strawberry-graphql / strawberry-django

Strawberry GraphQL Django extension
MIT License
391 stars 115 forks source link

lookups doesn't accept null #459

Closed devkral closed 3 months ago

devkral commented 5 months ago

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

Upvote & Fund

Fund with Polar

bellini666 commented 3 months ago

Fixed by https://github.com/strawberry-graphql/strawberry-django/pull/478

devkral commented 3 months ago

good idea, thank you