Skip to content

Commit 9e6dcd8

Browse files
committed
Increase example max depths and mention introspection requirement
1 parent c1caefd commit 9e6dcd8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

guides/queries/complexity_and_depth.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,15 @@ You can also reject queries based on the depth of their nesting. You can define
129129
# Schema-level:
130130
class MySchema < GraphQL::Schema
131131
# ...
132-
max_depth 10
132+
max_depth 15
133133
end
134134

135135
# Query-level, which overrides the schema-level setting:
136-
MySchema.execute(query_string, max_depth: 10)
136+
MySchema.execute(query_string, max_depth: 20)
137137
```
138138

139+
(**Note:** the default introspection query from GraphiQL requires at least `max_depth 13`.)
140+
139141
You can use `nil` to disable the validation:
140142

141143
```ruby

guides/schema/definition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Then, during execution, `context` will be an instance of `CustomContext`.
176176

177177
```ruby
178178
class MySchema < GraphQL::Schema
179-
max_depth 10
179+
max_depth 15
180180
max_complexity 300
181181
default_max_page_size 20
182182
end

0 commit comments

Comments
 (0)