Merge pull request #9777 from unclecheese/pulls/4/plugin-away

DOCS: Document new stateless plugins
This commit is contained in:
Ingo Schommer 2020-12-08 10:17:47 +13:00 committed by GitHub
commit a9f9de167a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -126,7 +126,7 @@ Plugins have to be registered with Injector.
SilverStripe\Core\Injector\Injector:
SilverStripe\GraphQL\Schema\Registry\PluginRegistry:
constructor:
myPlugin: '%$MyProject\Plugins\MyPlugin'
- 'MyProject\Plugins\MyPlugin'
```
[info]

View File

@ -73,7 +73,7 @@ Let's register the plugin:
SilverStripe\Core\Injector\Injector:
SilverStripe\GraphQL\Schema\Registry\PluginRegistry:
constructor:
truncate: '%$MyProject\Plugins\Truncator'
- 'MyProject\Plugins\Truncator'
```
And now we can apply it to any string field we want:

View File

@ -246,8 +246,8 @@ Back to Injector:
SilverStripe\Core\Injector\Injector:
SilverStripe\GraphQL\Schema\Registry\PluginRegistry:
constructor:
geocodeQuery: '%$MyProject\Plugins\GeocodableQuery'
geocodeDataObject: '%$MyProject\Plugins\GeocodableDataObject'
- 'MyProject\Plugins\GeocodableQuery'
- 'MyProject\Plugins\GeocodableDataObject'
```
### Step 6: Apply the plugins