mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-02 20:54:16 +03:00
Improved is_graphene_type
This commit is contained in:
parent
35f42f4e0c
commit
995150bfa5
|
@ -11,9 +11,7 @@ def is_graphene_type(_type):
|
||||||
from ..relay.mutation import ClientIDMutation
|
from ..relay.mutation import ClientIDMutation
|
||||||
from ..relay.connection import Connection
|
from ..relay.connection import Connection
|
||||||
|
|
||||||
if _type in [Interface, InputObjectType, ObjectType, Mutation, ClientIDMutation, Connection]:
|
return inspect.isclass(_type) and hasattr(_type, '_meta') and issubclass(_type, (
|
||||||
return False
|
|
||||||
return inspect.isclass(_type) and issubclass(_type, (
|
|
||||||
Interface,
|
Interface,
|
||||||
ObjectType,
|
ObjectType,
|
||||||
InputObjectType,
|
InputObjectType,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user