Skip to content

Commit e05dcbd

Browse files
authored
Merge pull request rmosolgo#4214 from 10io/patch-3
Update the extension options section
2 parents 2515f2a + 9ae72c0 commit e05dcbd

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)