DOCS: Document new stateless plugins

This commit is contained in:
Aaron Carlino 2020-11-19 13:27:08 +13:00
parent 19af9cfc13
commit e69cfd152e
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\Core\Injector\Injector:
SilverStripe\GraphQL\Schema\Registry\PluginRegistry: SilverStripe\GraphQL\Schema\Registry\PluginRegistry:
constructor: constructor:
myPlugin: '%$MyProject\Plugins\MyPlugin' - 'MyProject\Plugins\MyPlugin'
``` ```
[info] [info]

View File

@ -73,7 +73,7 @@ Let's register the plugin:
SilverStripe\Core\Injector\Injector: SilverStripe\Core\Injector\Injector:
SilverStripe\GraphQL\Schema\Registry\PluginRegistry: SilverStripe\GraphQL\Schema\Registry\PluginRegistry:
constructor: constructor:
truncate: '%$MyProject\Plugins\Truncator' - 'MyProject\Plugins\Truncator'
``` ```
And now we can apply it to any string field we want: 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\Core\Injector\Injector:
SilverStripe\GraphQL\Schema\Registry\PluginRegistry: SilverStripe\GraphQL\Schema\Registry\PluginRegistry:
constructor: constructor:
geocodeQuery: '%$MyProject\Plugins\GeocodableQuery' - 'MyProject\Plugins\GeocodableQuery'
geocodeDataObject: '%$MyProject\Plugins\GeocodableDataObject' - 'MyProject\Plugins\GeocodableDataObject'
``` ```
### Step 6: Apply the plugins ### Step 6: Apply the plugins