Skip to content

Commit ac5dd90

Browse files
committed
fix typo in docs
1 parent 7be4bd6 commit ac5dd90

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/execution/validation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Example
2020
Here is how you would implement depth-limiting on your schema.
2121

2222
.. code:: python
23-
from graphql import validate
23+
from graphql import validate, parse
2424
from graphene import ObjectType, Schema, String
2525
from graphene.validation import depth_limit_validator
2626
@@ -36,7 +36,7 @@ Here is how you would implement depth-limiting on your schema.
3636
3737
validation_errors = validate(
3838
schema=schema,
39-
document='THE QUERY',
39+
document_ast=parse('THE QUERY'),
4040
rules=(
4141
depth_limit_validator(
4242
max_depth=20

graphene/validation/tests/test_depth_limit_validator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ def callback(query_depths):
8787
result = query_depths
8888

8989
errors = validate(
90-
schema.graphql_schema,
91-
document,
90+
schema=schema.graphql_schema,
91+
document_ast=document,
9292
rules=(
9393
depth_limit_validator(
9494
max_depth=max_depth,

graphene/validation/tests/test_disable_introspection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ def run_query(query: str):
1919
result = None
2020

2121
errors = validate(
22-
schema.graphql_schema,
23-
document,
22+
schema=schema.graphql_schema,
23+
document_ast=document,
2424
rules=(
2525
disable_introspection(),
2626
),

0 commit comments

Comments
 (0)