Skip to content

Commit 2d2143d

Browse files
committedMar 31, 2022
fix: fix wrong typing for the AdvancedDjangoFilterConnectionField constructor
1 parent e9f023a commit 2d2143d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎graphene_django_filter/connection_field.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
module instead of the `DjangoFilterConnectionField` from graphene-django.
55
"""
66

7-
from typing import Any, Dict, Iterable, Optional, Type
7+
from typing import Any, Callable, Dict, Iterable, Optional, Type, Union
88

99
import graphene
1010
from django.core.exceptions import ValidationError
@@ -24,7 +24,7 @@ class AdvancedDjangoFilterConnectionField(DjangoFilterConnectionField):
2424

2525
def __init__(
2626
self,
27-
type: Type[DjangoObjectType],
27+
type: Union[Type[DjangoObjectType], Callable[[], Type[DjangoObjectType]], str],
2828
fields: Optional[Dict[str, list]] = None,
2929
order_by: Any = None,
3030
extra_filter_meta: Optional[dict] = None,

0 commit comments

Comments
 (0)