fix typo in docs

This commit is contained in:
Aryan Iyappan 2021-08-14 07:54:58 +05:30
parent 7be4bd6bc6
commit ac5dd90f5f
3 changed files with 6 additions and 6 deletions

View File

@ -20,7 +20,7 @@ Example
Here is how you would implement depth-limiting on your schema.
.. code:: python
from graphql import validate
from graphql import validate, parse
from graphene import ObjectType, Schema, String
from graphene.validation import depth_limit_validator
@ -36,7 +36,7 @@ Here is how you would implement depth-limiting on your schema.
validation_errors = validate(
schema=schema,
document='THE QUERY',
document_ast=parse('THE QUERY'),
rules=(
depth_limit_validator(
max_depth=20

View File

@ -87,8 +87,8 @@ def run_query(query: str, max_depth: int, ignore=None):
result = query_depths
errors = validate(
schema.graphql_schema,
document,
schema=schema.graphql_schema,
document_ast=document,
rules=(
depth_limit_validator(
max_depth=max_depth,

View File

@ -19,8 +19,8 @@ def run_query(query: str):
result = None
errors = validate(
schema.graphql_schema,
document,
schema=schema.graphql_schema,
document_ast=document,
rules=(
disable_introspection(),
),