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 4f4a006 commit 13a335b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/GraphQL/Resolvers/Resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,21 @@
use SilverStripe\ORM\ValidationException;
use InvalidArgumentException;
use Exception;
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 () {
$message = 'Will be removed without equivalent functionality to replace it';
Deprecation::notice('5.3.0', $message, Deprecation::SCOPE_CLASS);
});
}

/**
* @param $value
* @return object
Expand Down
4 changes: 4 additions & 0 deletions src/Models/BaseElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -1280,9 +1280,13 @@ public function EvenOdd()

/**
* @return string
* @deprecated 5.3.0 Will be removed without equivalent functionality to replace it
*/
public static function getGraphQLTypeName(): string
{
Deprecation::withNoReplacement(function () {
Deprecation::notice('5.3.0', 'Will be removed without equivalent functionality to replace it');
});
// For GraphQL 3, use the static schema type name - except for BaseElement for which this is inconsistent.
if (class_exists(StaticSchema::class) && static::class !== BaseElement::class) {
return StaticSchema::inst()->typeNameForDataObject(static::class);
Expand Down
12 changes: 12 additions & 0 deletions src/ORM/FieldType/DBObjectType.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,21 @@

use SilverStripe\GraphQL\Manager;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\Dev\Deprecation;

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

/**
* Add the field to the underlying database.
*/
Expand Down

0 comments on commit 13a335b

Please sign in to comment.