Improved resolver consistency

This commit is contained in:
Syrus Akbary 2017-07-26 23:36:08 -07:00
parent f5ecee3b1b
commit 6ceb07c51c
2 changed files with 6 additions and 5 deletions

View File

@ -4,6 +4,7 @@ from django.db.models.query import QuerySet
from promise import Promise
from graphene import final_resolver
from graphene.types import Field, List
from graphene.relay import ConnectionField, PageInfo
from graphql_relay.connection.arrayconnection import connection_from_list_slice
@ -128,11 +129,11 @@ class DjangoConnectionField(ConnectionField):
return on_resolve(iterable)
def get_resolver(self, parent_resolver):
return partial(
return final_resolver(partial(
self.connection_resolver,
parent_resolver,
self.type,
self.get_manager(),
self.max_limit,
self.enforce_first_or_last
)
))

View File

@ -1,7 +1,7 @@
from collections import OrderedDict
from functools import partial
# from graphene.relay import is_node
from graphene import final_resolver
from graphene.types.argument import to_arguments
from ..fields import DjangoConnectionField
from .utils import get_filtering_args_from_filterset, get_filterset_class
@ -89,7 +89,7 @@ class DjangoFilterConnectionField(DjangoConnectionField):
)
def get_resolver(self, parent_resolver):
return partial(
return final_resolver(partial(
self.connection_resolver,
parent_resolver,
self.type,
@ -98,4 +98,4 @@ class DjangoFilterConnectionField(DjangoConnectionField):
self.enforce_first_or_last,
self.filterset_class,
self.filtering_args
)
))