Skip to content

Commit 85e1f79

Browse files
committed
Remove deprecated inputObject/enumObjet properties in favour of classes
The replacement is to extend `EnumType` and `InputType` directly and not rely on these properties.
1 parent bd8f66a commit 85e1f79

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

src/Support/Type.php

-24
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
declare(strict_types = 1);
44
namespace Rebing\GraphQL\Support;
55

6-
use GraphQL\Type\Definition\EnumType;
76
use GraphQL\Type\Definition\FieldDefinition;
8-
use GraphQL\Type\Definition\InputObjectType;
97
use GraphQL\Type\Definition\ObjectType;
108
use GraphQL\Type\Definition\Type as GraphqlType;
119
use Illuminate\Support\Str;
@@ -17,20 +15,6 @@
1715
abstract class Type implements TypeConvertible
1816
{
1917
protected $attributes = [];
20-
/**
21-
* Set to `true` in your type when it should reflect an InputObject.
22-
* @var bool
23-
* @deprecated Use InputType instead
24-
* @see InputType
25-
*/
26-
protected $inputObject = false;
27-
/**
28-
* Set to `true` in your type when it should reflect an Enum.
29-
* @var bool
30-
* @deprecated Use EnumType instead
31-
* @see EnumType
32-
*/
33-
protected $enumObject = false;
3418

3519
public function attributes(): array
3620
{
@@ -138,14 +122,6 @@ public function toArray(): array
138122

139123
public function toType(): GraphqlType
140124
{
141-
if ($this->inputObject) {
142-
return new InputObjectType($this->toArray());
143-
}
144-
145-
if ($this->enumObject) {
146-
return new EnumType($this->toArray());
147-
}
148-
149125
return new ObjectType($this->toArray());
150126
}
151127

0 commit comments

Comments
 (0)