Skip to content

Commit

Permalink
Update readone resolver to match legacy resolver in CMS page
Browse files Browse the repository at this point in the history
  • Loading branch information
satrun77 committed Oct 21, 2021
1 parent 0e9d378 commit 7453621
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion _legacy/SnapshotScaffoldingProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@

namespace SilverStripe\SnapshotAdmin;

use SilverStripe\Admin\GraphQL\ReadOneLegacyResolver;
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Core\ClassInfo;
use SilverStripe\GraphQL\Scaffolding\Interfaces\ScaffoldingProvider;
use SilverStripe\GraphQL\Scaffolding\Scaffolders\CRUD\ReadOne;
use SilverStripe\GraphQL\Scaffolding\Scaffolders\SchemaScaffolder;
use SilverStripe\GraphQL\Scaffolding\StaticSchema;
use SilverStripe\ORM\DataObject;
use SilverStripe\Security\Member;

if (!interface_exists(ScaffoldingProvider::class)) {
if (!interface_exists(ReadOneLegacyResolver::class)) {
return;
}

Expand Down Expand Up @@ -46,6 +49,7 @@ public function provideGraphQLScaffolding(SchemaScaffolder $scaffolder)
->addFields($fields)
->operation(SchemaScaffolder::READ_ONE)
->addArg('filter', 'IDFilterType!')
->setResolver([ReadOneLegacyResolver::class, 'resolve'])
->end()
->operation('rollback');
}
Expand Down

0 comments on commit 7453621

Please sign in to comment.