Skip to content

Commit

Permalink
API Deprecate GraphQL
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Aug 15, 2024
1 parent 96ce092 commit 0d37e29
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions code/GraphQL/LinkablePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@
use SilverStripe\GraphQL\Schema\Schema;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataList;
use SilverStripe\Dev\Deprecation;

if (!interface_exists(ModelQueryPlugin::class)) {
return;
}

/**
* @deprecated 5.3.0 Will be removed without equivalent functionality to replace it
*/
class LinkablePlugin implements ModelQueryPlugin
{
use Configurable;
Expand All @@ -43,6 +47,13 @@ class LinkablePlugin implements ModelQueryPlugin
*/
private static $resolver = [__CLASS__, 'applyLinkFilter'];

public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::notice('5.3.0', 'Will be removed without equivalent functionality to replace it', Deprecation::SCOPE_CLASS);
});
}

/**
* @return string
*/
Expand Down
11 changes: 11 additions & 0 deletions code/GraphQL/Resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,20 @@
namespace SilverStripe\CMS\GraphQL;

use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Dev\Deprecation;

/**
* @deprecated 5.3.0 Will be removed without equivalent functionality to replace it
*/
class Resolver
{
public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::notice('5.3.0', 'Will be removed without equivalent functionality to replace it', Deprecation::SCOPE_CLASS);
});
}

public static function resolveGetPageByLink($obj, array $args = [])
{
return SiteTree::get_by_link($args['link']);
Expand Down

0 comments on commit 0d37e29

Please sign in to comment.