mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
NEW: Compliance with new SchemaConfig API (#2617)
This commit is contained in:
parent
2ad7c609d5
commit
7b960c1537
@ -3,13 +3,6 @@ Name: cms-graphql
|
|||||||
Only:
|
Only:
|
||||||
classexists: 'SilverStripe\GraphQL\Schema\Schema'
|
classexists: 'SilverStripe\GraphQL\Schema\Schema'
|
||||||
---
|
---
|
||||||
SilverStripe\Core\Injector\Injector:
|
|
||||||
SilverStripe\GraphQL\Schema\Registry\ResolverRegistry:
|
|
||||||
constructor:
|
|
||||||
cmsResolver: '%$SilverStripe\CMS\GraphQL\Resolver'
|
|
||||||
SilverStripe\GraphQL\Schema\Registry\PluginRegistry:
|
|
||||||
constructor:
|
|
||||||
linkable: '%$SilverStripe\CMS\GraphQL\LinkablePlugin'
|
|
||||||
SilverStripe\CMS\Model\SiteTree:
|
SilverStripe\CMS\Model\SiteTree:
|
||||||
graphql_blacklisted_fields:
|
graphql_blacklisted_fields:
|
||||||
HasBrokenFile: true
|
HasBrokenFile: true
|
||||||
@ -20,28 +13,5 @@ SilverStripe\CMS\Model\SiteTree:
|
|||||||
SilverStripe\GraphQL\Schema\Schema:
|
SilverStripe\GraphQL\Schema\Schema:
|
||||||
schemas:
|
schemas:
|
||||||
admin:
|
admin:
|
||||||
models:
|
src:
|
||||||
Page:
|
- 'silverstripe/cms: _graphql'
|
||||||
fields:
|
|
||||||
id: true
|
|
||||||
lastEdited: true
|
|
||||||
absoluteLink:
|
|
||||||
type: String
|
|
||||||
operations:
|
|
||||||
copyToStage: true
|
|
||||||
rollback: true
|
|
||||||
readOne: true
|
|
||||||
SilverStripe\Security\Member:
|
|
||||||
fields:
|
|
||||||
id: true
|
|
||||||
firstName: true
|
|
||||||
surname: true
|
|
||||||
operations:
|
|
||||||
readOne: true
|
|
||||||
modelConfig:
|
|
||||||
DataObject:
|
|
||||||
operations:
|
|
||||||
read:
|
|
||||||
plugins:
|
|
||||||
getByLink:
|
|
||||||
after: filter
|
|
||||||
|
9
_graphql/config.yml
Normal file
9
_graphql/config.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
resolvers:
|
||||||
|
- 'SilverStripe\CMS\GraphQL\Resolver'
|
||||||
|
modelConfig:
|
||||||
|
DataObject:
|
||||||
|
operations:
|
||||||
|
read:
|
||||||
|
plugins:
|
||||||
|
getByLink:
|
||||||
|
after: filter
|
17
_graphql/models.yml
Normal file
17
_graphql/models.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
Page:
|
||||||
|
fields:
|
||||||
|
id: true
|
||||||
|
lastEdited: true
|
||||||
|
absoluteLink:
|
||||||
|
type: String
|
||||||
|
operations:
|
||||||
|
copyToStage: true
|
||||||
|
rollback: true
|
||||||
|
readOne: true
|
||||||
|
SilverStripe\Security\Member:
|
||||||
|
fields:
|
||||||
|
id: true
|
||||||
|
firstName: true
|
||||||
|
surname: true
|
||||||
|
operations:
|
||||||
|
readOne: true
|
@ -4,13 +4,8 @@
|
|||||||
namespace SilverStripe\CMS\GraphQL;
|
namespace SilverStripe\CMS\GraphQL;
|
||||||
|
|
||||||
use SilverStripe\CMS\Model\SiteTree;
|
use SilverStripe\CMS\Model\SiteTree;
|
||||||
use SilverStripe\GraphQL\Schema\Resolver\DefaultResolverProvider;
|
|
||||||
|
|
||||||
if (!class_exists(DefaultResolverProvider::class)) {
|
class Resolver
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
class Resolver extends DefaultResolverProvider
|
|
||||||
{
|
{
|
||||||
public static function resolveGetPageByLink($obj, array $args = [])
|
public static function resolveGetPageByLink($obj, array $args = [])
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user