strawberry-graphql / strawberry-django

Strawberry GraphQL Django extension
https://strawberry.rocks/docs/django
MIT License
408 stars 118 forks source link

Question: apply filters in 'custom' resolver #92

Closed gersmann closed 2 years ago

gersmann commented 2 years ago

Hi, thank you for the library. This is a question rather than an issue. If I implement a custom resolver, is there a way to 'reuse' the functionality of applying the filters to a base queryset in some way?

la4de commented 2 years ago

Example for that pushed to repo. https://github.com/strawberry-graphql/strawberry-graphql-django/blob/main/tests/filters/test_filters.py#L138-L151

gersmann commented 2 years ago

Very nice, thanks a lot.

jcuenod commented 11 months ago

For posterity: https://github.com/strawberry-graphql/strawberry-graphql-django/commit/98edfa4d8032f19570b21aa252a2e57e3c78c9e4