Skip to content

Conversation

BossGrand
Copy link
Member

other queryset modifications being applied in resolvers.

the actual fix is really small.

In DjangoFilterConnectionField.merge_querysets default_queryset was overriding queryset.

if you look at DjangoConnectionField.merge_querysets you can see it was doing this merge correctly.

@classmethod
    def merge_querysets(cls, default_queryset, queryset):
        return queryset & default_queryset 

So this pr simply changes DjangoFilterConnectionField merge to match DjangoConnectionField merge. Along with a couple of tests

This should fix #197 fix #238 fix #244

@coveralls
Copy link

coveralls commented Nov 3, 2017

Coverage Status

Coverage decreased (-0.2%) to 92.79% when pulling 4013f78 on BossGrand:fix/django_filter_connection_field_merge_queries into 2600f0f on graphql-python:master.

@BossGrand
Copy link
Member Author

The coverage looks really unrelated to what I was doing. Can someone look at it and help me figure out how to make it match what it was before

@urbandove
Copy link
Contributor

I just noticed that it seems this same pull request has been suggested multiple times.
The same change is in PR #166 (minus test) and it seems to me the same issue is being fixed with PR #224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants