mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-02 12:44:15 +03:00
fix typo in docs
This commit is contained in:
parent
7be4bd6bc6
commit
ac5dd90f5f
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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(),
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue
Block a user