Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Deprecate GraphQL #1235

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 replaced with getTypeName()
*/
public static function getGraphQLTypeName(): string
{
Deprecation::withNoReplacement(function () {
Deprecation::notice('5.3.0', 'Will be replaced with getTypeName()');
});
// 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
Loading