Closed cyhuang1230 closed 4 years ago
Merging #150 into master will increase coverage by
0.01%
. The diff coverage is66.66%
.
@@ Coverage Diff @@
## master #150 +/- ##
==========================================
+ Coverage 53.63% 53.65% +0.01%
==========================================
Files 24 24
Lines 1965 1968 +3
==========================================
+ Hits 1054 1056 +2
- Misses 911 912 +1
Impacted Files | Coverage Ξ | |
---|---|---|
graphene_django_extras/types.py | 68.38% <66.66%> (-0.02%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Ξ = absolute <relative> (impact)
,ΓΈ = not affected
,? = missing data
Powered by Codecov. Last update 8bd4e65...be073a1. Read the comment docs.
Thanks for the input π
Background:
graphene-django
added a method toDjangoObjectType
calledget_queryset
(commit)list_resolver
worked inDjangoListField
(commit)v2.10.0
becauseget_queryset
was only called whenif queryset is None
, which is never true (I guess π€)Issue:
In
v2.10.0
, they refactoredlist_resolver
inDjangoListField
(commit). This time,get_queryset
will always be called.Without
get_queryset
method, objects inherited fromgraphene-django-extras.types.DjangoObjectType
will throwtype object has no attribute 'get_queryset'
(like below).Proposed Solution:
Add
get_queryset
method tographene-django-extras.types.DjangoObjectType
likegraphene-django
did.