mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-22 04:46:04 +03:00
TASK: Allow UnionType extensions
This commit is contained in:
parent
1dc2b939cb
commit
0c33cfa88f
@ -6,6 +6,7 @@ namespace GraphQL\Type\Definition;
|
||||
|
||||
use GraphQL\Error\InvariantViolation;
|
||||
use GraphQL\Language\AST\UnionTypeDefinitionNode;
|
||||
use GraphQL\Language\AST\UnionTypeExtensionNode;
|
||||
use GraphQL\Utils\Utils;
|
||||
use function call_user_func;
|
||||
use function is_array;
|
||||
@ -27,6 +28,9 @@ class UnionType extends Type implements AbstractType, OutputType, CompositeType,
|
||||
/** @var ObjectType[] */
|
||||
private $possibleTypeNames;
|
||||
|
||||
/** @var UnionTypeExtensionNode[] */
|
||||
public $extensionASTNodes;
|
||||
|
||||
public function __construct($config)
|
||||
{
|
||||
if (! isset($config['name'])) {
|
||||
@ -43,6 +47,7 @@ class UnionType extends Type implements AbstractType, OutputType, CompositeType,
|
||||
$this->name = $config['name'];
|
||||
$this->description = $config['description'] ?? null;
|
||||
$this->astNode = $config['astNode'] ?? null;
|
||||
$this->extensionASTNodes = $config['extensionASTNodes'] ?? null;
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user