mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
5ab1ff3e69
* Add GraphQL4 compatibility * Add getPageByLink * Blacklist sitetree fields * Remove getByLink from default schema. use linkable plugin * getByLink compatability with new readOne filter anything * Remove return type * Compliance with new modelConfig * Prep for travis * Improvements for versioned-admin compat * BC class guards * New graphql 3 compat * Fix travis syntax error * New backward graphqlphp dependency * Lint, build * New phpcs exclusion * Tidy up travis * Fix rollback mutation * Update code/GraphQL/_legacy/ReadOneResolver.php Co-authored-by: Ingo Schommer <ingo@silverstripe.com> * Address ingo feedback * Deprecated GraphQL v3 classes * Remove deleted branches Co-authored-by: Ingo Schommer <ingo@silverstripe.com> Co-authored-by: Ingo Schommer <me@chillu.com>
20 lines
405 B
PHP
20 lines
405 B
PHP
<?php
|
|
|
|
|
|
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
|
|
{
|
|
public static function resolveGetPageByLink($obj, array $args = [])
|
|
{
|
|
return SiteTree::get_by_link($args['link']);
|
|
}
|
|
}
|