Skip to content

Commit 2e04c3d

Browse files
committed
Add docs for extra_types
1 parent c08c94e commit 2e04c3d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

guides/schema/definition.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,14 @@ class MySchema < GraphQL::Schema
193193
use(GraphQL::Tracing::NewRelicTracing)
194194
end
195195
```
196+
197+
## Extra Types
198+
199+
Documentation-only types can be attached to the schema using {{ "Schema.extra_types" | api_doc }}. Types passed to this method will _always_ be available in introspection queries and SDL print-outs.
200+
201+
```ruby
202+
class MySchema < GraphQL::Schema
203+
# These aren't for queries, but will appear in documentation:
204+
extra_types SystemErrorType, RateLimitExceptionType
205+
end
206+
```

0 commit comments

Comments
 (0)