Skip to content

Commit 9ae72c0

Browse files
authored
Update the extension options section
Document extensions options when using the `extensions: [...]` option.
1 parent 2515f2a commit 9ae72c0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

guides/type_definitions/field_extensions.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ def after_resolve(value:, **rest)
116116
end
117117
```
118118

119+
If you use the `extensions: [...]` option, you can pass options using a hash:
120+
121+
```ruby
122+
field :name, String, null: false, extensions: [LimitExtension => { limit: 20 }]
123+
```
124+
119125
## Using `extras`
120126

121127
Extensions can have the same `extras` as fields (see {% internal_link "Extra Field Metadata", "fields/introduction#extra-field-metadata" %}). Add them by calling `extras` in the class definition:

0 commit comments

Comments
 (0)