Skip to content

Commit

Permalink
V2 has broken liks too see #1309 (#1310)
Browse files Browse the repository at this point in the history
* fix broken links for the v2 branch

v2 brach has broken links to read the docs too

I additionally found a link to the git hub master tree, which should be
changed to main.

* #1295 github link fixed (master->v2)

Co-authored-by: Peter Paul Kiefer <dafisppk@gmail.com>
  • Loading branch information
ppk42 and Peter Paul Kiefer authored Feb 13, 2022
1 parent a7a8b3d commit ed4ee98
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/filtering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ Filtering
=========

Graphene-Django integrates with
`django-filter <https://django-filter.readthedocs.io/en/master/>`__ (2.x for
`django-filter <https://django-filter.readthedocs.io/en/main/>`__ (2.x for
Python 3 or 1.x for Python 2) to provide filtering of results. See the `usage
documentation <https://django-filter.readthedocs.io/en/master/guide/usage.html#the-filter>`__
documentation <https://django-filter.readthedocs.io/en/main/guide/usage.html#the-filter>`__
for details on the format for ``filter_fields``.

This filtering is automatically available when implementing a ``relay.Node``.
Expand All @@ -27,15 +27,15 @@ After installing ``django-filter`` you'll need to add the application in the ``s
]
Note: The techniques below are demoed in the `cookbook example
app <https://github.com/graphql-python/graphene-django/tree/master/examples/cookbook>`__.
app <https://github.com/graphql-python/graphene-django/tree/v2/examples/cookbook>`__.

Filterable fields
-----------------

The ``filter_fields`` parameter is used to specify the fields which can
be filtered upon. The value specified here is passed directly to
``django-filter``, so see the `filtering
documentation <https://django-filter.readthedocs.io/en/master/guide/usage.html#the-filter>`__
documentation <https://django-filter.readthedocs.io/en/main/guide/usage.html#the-filter>`__
for full details on the range of options available.

For example:
Expand Down Expand Up @@ -163,7 +163,7 @@ in unison with the ``filter_fields`` parameter:
animal = relay.Node.Field(AnimalNode)
all_animals = DjangoFilterConnectionField(AnimalNode)
The context argument is passed on as the `request argument <http://django-filter.readthedocs.io/en/master/guide/usage.html#request-based-filtering>`__
The context argument is passed on as the `request argument <http://django-filter.readthedocs.io/en/main/guide/usage.html#request-based-filtering>`__
in a ``django_filters.FilterSet`` instance. You can use this to customize your
filters to be context-dependent. We could modify the ``AnimalFilter`` above to
pre-filter animals owned by the authenticated user (set in ``context.user``).
Expand Down

0 comments on commit ed4ee98

Please sign in to comment.