From 898329c240bdce616ac9ccc8a0129695bd43455f Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Tue, 3 Nov 2015 21:41:06 -0800 Subject: [PATCH] Improved resolve_type function using partials --- graphene/core/types.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphene/core/types.py b/graphene/core/types.py index 49c617fa..b5c917ef 100644 --- a/graphene/core/types.py +++ b/graphene/core/types.py @@ -1,6 +1,7 @@ import copy import inspect from collections import OrderedDict +from functools import partial import six @@ -192,8 +193,7 @@ class BaseObjectType(object): return GraphQLInterfaceType( cls._meta.type_name, description=cls._meta.description, - resolve_type=lambda * - args, **kwargs: cls.resolve_type(schema, *args, **kwargs), + resolve_type=partial(cls.resolve_type, schema), fields=fields ) return GraphQLObjectType(