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

Remove deprecated inputObject/enumObjet properties in favour of classes #752

Merged
merged 1 commit into from
Apr 18, 2021
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ CHANGELOG
--------------

## Breaking changes
- Remove deprecated `\Rebing\GraphQL\Support\Type::$inputObject` and `\Rebing\GraphQL\Support\Type::$enumObject` properties [\#752 / mfn](https://github.com/rebing/graphql-laravel/pull/752)\
Instead in your code, extend `\Rebing\GraphQL\Support\InputType` and `\Rebing\GraphQL\Support\EnumType` directly
- Support for Lumen has been removed
- Integrate laragraph/utils RequestParser [\#739 / mfn](https://github.com/rebing/graphql-laravel/pull/739)
- batched queries will only work with `POST` requests
Expand Down
24 changes: 0 additions & 24 deletions src/Support/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
declare(strict_types = 1);
namespace Rebing\GraphQL\Support;

use GraphQL\Type\Definition\EnumType;
use GraphQL\Type\Definition\FieldDefinition;
use GraphQL\Type\Definition\InputObjectType;
use GraphQL\Type\Definition\ObjectType;
use GraphQL\Type\Definition\Type as GraphqlType;
use Illuminate\Support\Str;
Expand All @@ -17,20 +15,6 @@
abstract class Type implements TypeConvertible
{
protected $attributes = [];
/**
* Set to `true` in your type when it should reflect an InputObject.
* @var bool
* @deprecated Use InputType instead
* @see InputType
*/
protected $inputObject = false;
/**
* Set to `true` in your type when it should reflect an Enum.
* @var bool
* @deprecated Use EnumType instead
* @see EnumType
*/
protected $enumObject = false;

public function attributes(): array
{
Expand Down Expand Up @@ -138,14 +122,6 @@ public function toArray(): array

public function toType(): GraphqlType
{
if ($this->inputObject) {
return new InputObjectType($this->toArray());
}

if ($this->enumObject) {
return new EnumType($this->toArray());
}

return new ObjectType($this->toArray());
}

Expand Down