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

View File

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

View File

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