From b1dbcedd6b88933a7adc961837ecaf2513fe4589 Mon Sep 17 00:00:00 2001 From: nickharris Date: Fri, 11 May 2018 17:17:27 -0600 Subject: [PATCH] added partial check for Dynamic type --- graphene/types/dynamic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/graphene/types/dynamic.py b/graphene/types/dynamic.py index 6c4092f0..0efbd081 100644 --- a/graphene/types/dynamic.py +++ b/graphene/types/dynamic.py @@ -1,4 +1,5 @@ import inspect +from functools import partial from .mountedtype import MountedType @@ -11,7 +12,7 @@ class Dynamic(MountedType): def __init__(self, type, with_schema=False, _creation_counter=None): super(Dynamic, self).__init__(_creation_counter=_creation_counter) - assert inspect.isfunction(type) + assert inspect.isfunction(type) or isinstance(type, partial) self.type = type self.with_schema = with_schema