Open cikay opened 11 months ago
how should strawberry support them?
how should strawberry support them?
The basic support is to just add this type to the package
and document how to use it like below
@strawberry.type
class User:
name: FilterLookup[str]
To make all fields as Lookup you can follow the same way in strawberry-graphql-django
@strawberry.input(lookups=True)
class User:
firstname: str
lastname: str
will be equivalent
@strawberry.input
class User:
firstname: FilterLooup[str]
lastname: FilterLookup[str]
I think this might be a case where this feature could be implemented in a 3rd party package 😊
/cc @bellini666
I think this might be a case where this feature could be implemented in a 3rd party package 😊
/cc @bellini666
I agree, specially because the implementation of those operators will be ORM specific.
Strawberry should support comparison operators such as greater than, less than, starts with etc. strawbeery-graphql-django package supports it but strawberry should support it independent of an ORM.
Feature Request Type
Upvote & Fund