Skip to content

Commit f6bf489

Browse files
committed
Add docs
1 parent 6183718 commit f6bf489

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

guides/authorization/visibility.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,17 @@ end
9393
```
9494

9595
For this to work, the base argument class must be {% internal_link "configured with other GraphQL types", "/type_definitions/extensions.html#customizing-arguments" %}.
96+
97+
## Opting Out
98+
99+
By default, GraphQL-Ruby always runs visibility checks. You can opt out of this by adding to your schema class:
100+
101+
```ruby
102+
class MySchema < GraphQL::Schema
103+
# ...
104+
# Opt out of GraphQL-Ruby's visibility feature:
105+
use GraphQL::Schema::AlwaysVisible
106+
end
107+
```
108+
109+
For big schemas, this can be a worthwhile speed-up.

0 commit comments

Comments
 (0)