mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-11 04:07:16 +03:00
Improve is_node
error message
This commit is contained in:
parent
88ccaec8fa
commit
ef18eb5ce3
|
@ -13,8 +13,8 @@ def is_node(objecttype):
|
|||
Check if the given objecttype has Node as an interface
|
||||
'''
|
||||
assert issubclass(objecttype, ObjectType), (
|
||||
'Only ObjectTypes can have a Node interface.'
|
||||
)
|
||||
'Only ObjectTypes can have a Node interface. Received %s'
|
||||
) % objecttype
|
||||
for i in objecttype._meta.interfaces:
|
||||
if issubclass(i, Node):
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue
Block a user