Skip to content

Commit 9c1db0f

Browse files
authored
Merge pull request #1376 from codebyaryan/master
Fix unseen examples
2 parents 03aad27 + 10aee71 commit 9c1db0f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/execution/queryvalidation.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Usage
2222
Here is how you would implement depth-limiting on your schema.
2323

2424
.. code:: python
25+
2526
from graphql import validate, parse
2627
from graphene import ObjectType, Schema, String
2728
from graphene.validation import depth_limit_validator
@@ -37,7 +38,7 @@ Here is how you would implement depth-limiting on your schema.
3738
# will not be executed.
3839
3940
validation_errors = validate(
40-
schema=schema,
41+
schema=schema.graphql_schema,
4142
document_ast=parse('THE QUERY'),
4243
rules=(
4344
depth_limit_validator(
@@ -58,6 +59,7 @@ Usage
5859
Here is how you would disable introspection for your schema.
5960

6061
.. code:: python
62+
6163
from graphql import validate, parse
6264
from graphene import ObjectType, Schema, String
6365
from graphene.validation import DisableIntrospection
@@ -72,7 +74,7 @@ Here is how you would disable introspection for your schema.
7274
# introspection queries will not be executed.
7375
7476
validation_errors = validate(
75-
schema=schema,
77+
schema=schema.graphql_schema,
7678
document_ast=parse('THE QUERY'),
7779
rules=(
7880
DisableIntrospection,
@@ -92,6 +94,7 @@ reason. Here is an example query validator that visits field definitions in Grap
9294
if any of those fields are blacklisted:
9395

9496
.. code:: python
97+
9598
from graphql import GraphQLError
9699
from graphql.language import FieldNode
97100
from graphql.validation import ValidationRule

0 commit comments

Comments
 (0)