@@ -2,9 +2,9 @@ Filtering
22=========
33
44Graphene-Django integrates with
5- `django-filter <https://django-filter.readthedocs.io/en/master / >`__ (2.x for
5+ `django-filter <https://django-filter.readthedocs.io/en/main / >`__ (2.x for
66Python 3 or 1.x for Python 2) to provide filtering of results. See the `usage
7- documentation <https://django-filter.readthedocs.io/en/master /guide/usage.html#the-filter> `__
7+ documentation <https://django-filter.readthedocs.io/en/main /guide/usage.html#the-filter> `__
88for details on the format for ``filter_fields ``.
99
1010This filtering is automatically available when implementing a ``relay.Node ``.
@@ -27,15 +27,15 @@ After installing ``django-filter`` you'll need to add the application in the ``s
2727 ]
2828
2929 Note: The techniques below are demoed in the `cookbook example
30- app <https://github.com/graphql-python/graphene-django/tree/master /examples/cookbook> `__.
30+ app <https://github.com/graphql-python/graphene-django/tree/v2 /examples/cookbook> `__.
3131
3232Filterable fields
3333-----------------
3434
3535The ``filter_fields `` parameter is used to specify the fields which can
3636be filtered upon. The value specified here is passed directly to
3737``django-filter ``, so see the `filtering
38- documentation <https://django-filter.readthedocs.io/en/master /guide/usage.html#the-filter> `__
38+ documentation <https://django-filter.readthedocs.io/en/main /guide/usage.html#the-filter> `__
3939for full details on the range of options available.
4040
4141For example:
@@ -163,7 +163,7 @@ in unison with the ``filter_fields`` parameter:
163163 animal = relay.Node.Field(AnimalNode)
164164 all_animals = DjangoFilterConnectionField(AnimalNode)
165165
166- The context argument is passed on as the `request argument <http://django-filter.readthedocs.io/en/master /guide/usage.html#request-based-filtering >`__
166+ The context argument is passed on as the `request argument <http://django-filter.readthedocs.io/en/main /guide/usage.html#request-based-filtering >`__
167167in a ``django_filters.FilterSet `` instance. You can use this to customize your
168168filters to be context-dependent. We could modify the ``AnimalFilter `` above to
169169pre-filter animals owned by the authenticated user (set in ``context.user ``).
0 commit comments