mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-02 20:54:16 +03:00
Update depth_limit.py
This commit is contained in:
parent
ea4e6d65e9
commit
57a4394bf3
|
@ -25,7 +25,12 @@
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
import re
|
try:
|
||||||
|
from re import Pattern
|
||||||
|
except ImportError:
|
||||||
|
# backwards compatibility for v3.6
|
||||||
|
from typing import Pattern
|
||||||
|
|
||||||
from typing import Callable, Dict, List, Optional, Union
|
from typing import Callable, Dict, List, Optional, Union
|
||||||
|
|
||||||
from graphql import GraphQLError
|
from graphql import GraphQLError
|
||||||
|
@ -43,7 +48,7 @@ from graphql.language import (
|
||||||
from ..utils.is_introspection_key import is_introspection_key
|
from ..utils.is_introspection_key import is_introspection_key
|
||||||
|
|
||||||
|
|
||||||
IgnoreType = Union[Callable[[str], bool], re.Pattern, str]
|
IgnoreType = Union[Callable[[str], bool], Pattern, str]
|
||||||
|
|
||||||
|
|
||||||
def depth_limit_validator(
|
def depth_limit_validator(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user