diff --git a/graphene_django/filter/fields.py b/graphene_django/filter/fields.py index 83907e7..c2905ee 100644 --- a/graphene_django/filter/fields.py +++ b/graphene_django/filter/fields.py @@ -48,7 +48,11 @@ class DjangoFilterConnectionField(DjangoConnectionField): @property def filterset_class(self): - return get_filterset_class(self._filterset_class, **self.meta) + if self.node_type()._meta.filterset_class: + filterset_class = self.node_type()._meta.filterset_class + else: + filterset_class = get_filterset_class(self._filterset_class, **self.meta) + return filterset_class @property def filtering_args(self): diff --git a/graphene_django/types.py b/graphene_django/types.py index 8174f05..3710710 100644 --- a/graphene_django/types.py +++ b/graphene_django/types.py @@ -58,7 +58,8 @@ class DjangoObjectTypeMeta(ObjectTypeMeta): only_fields=(), exclude_fields=(), interfaces=(), - registry=None + registry=None, + filterset_class=None ) if DJANGO_FILTER_INSTALLED: # In case Django filter is available, then