Fixed assert name conversion

This commit is contained in:
Syrus Akbary 2022-10-12 13:09:03 +02:00
parent bb127090d9
commit 0eb3a3e6b0

View File

@ -26,7 +26,12 @@ from graphene import (
from graphene.types.json import JSONString
from graphene.types.scalars import BigInt
from graphene.utils.str_converters import to_camel_case
from graphql import GraphQLError, assert_name
from graphql import GraphQLError
try:
from graphql import assert_name
except ImportError:
# Support for older versions of graphql
from graphql import assert_valid_name as assert_name
from graphql.pyutils import register_description
from .compat import ArrayField, HStoreField, JSONField, PGJSONField, RangeField