mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-02 20:54:16 +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.
|
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
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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(),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user