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:
|
||||
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:
|
||||
graphql_blacklisted_fields:
|
||||
HasBrokenFile: true
|
||||
@ -20,28 +13,5 @@ SilverStripe\CMS\Model\SiteTree:
|
||||
SilverStripe\GraphQL\Schema\Schema:
|
||||
schemas:
|
||||
admin:
|
||||
models:
|
||||
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
|
||||
modelConfig:
|
||||
DataObject:
|
||||
operations:
|
||||
read:
|
||||
plugins:
|
||||
getByLink:
|
||||
after: filter
|
||||
src:
|
||||
- 'silverstripe/cms: _graphql'
|
||||
|
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;
|
||||
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\GraphQL\Schema\Resolver\DefaultResolverProvider;
|
||||
|
||||
if (!class_exists(DefaultResolverProvider::class)) {
|
||||
return;
|
||||
}
|
||||
|
||||
class Resolver extends DefaultResolverProvider
|
||||
class Resolver
|
||||
{
|
||||
public static function resolveGetPageByLink($obj, array $args = [])
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user