mirror of
https://github.com/graphql-python/graphene.git
synced 2025-04-28 13:33:41 +03:00
Improved function calling
This commit is contained in:
parent
898329c240
commit
b6df2d881d
|
@ -176,12 +176,12 @@ class BaseObjectType(object):
|
||||||
for f in cls._meta.fields])
|
for f in cls._meta.fields])
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def resolve_objecttype(cls, schema, instance, *_):
|
def resolve_objecttype(cls, schema, instance, *args):
|
||||||
return instance.__class__
|
return instance.__class__
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def resolve_type(cls, schema, instance, *_):
|
def resolve_type(cls, schema, instance, *args):
|
||||||
objecttype = cls.resolve_objecttype(schema, instance, *_)
|
objecttype = cls.resolve_objecttype(schema, instance, *args)
|
||||||
return schema.T(objecttype)
|
return schema.T(objecttype)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
Loading…
Reference in New Issue
Block a user