From b0ee36feb4e27191dc8b8ca47dd1171491857dfb Mon Sep 17 00:00:00 2001 From: Torsten Blindert Date: Mon, 1 Oct 2018 19:45:20 +0200 Subject: [PATCH] TASK: Allow InputObjectType extensions --- src/Type/Definition/InputObjectType.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Type/Definition/InputObjectType.php b/src/Type/Definition/InputObjectType.php index 4b4bb52..542a0d1 100644 --- a/src/Type/Definition/InputObjectType.php +++ b/src/Type/Definition/InputObjectType.php @@ -6,6 +6,7 @@ namespace GraphQL\Type\Definition; use GraphQL\Error\InvariantViolation; use GraphQL\Language\AST\InputObjectTypeDefinitionNode; +use GraphQL\Language\AST\InputObjectTypeExtensionNode; use GraphQL\Utils\Utils; use function call_user_func; use function is_array; @@ -24,6 +25,9 @@ class InputObjectType extends Type implements InputType, NamedType /** @var InputObjectField[] */ private $fields; + /** @var InputObjectTypeExtensionNode[] */ + public $extensionASTNodes; + /** * * @param mixed[] $config @@ -36,10 +40,11 @@ class InputObjectType extends Type implements InputType, NamedType Utils::invariant(is_string($config['name']), 'Must provide name.'); - $this->config = $config; - $this->name = $config['name']; - $this->astNode = $config['astNode'] ?? null; - $this->description = $config['description'] ?? null; + $this->config = $config; + $this->name = $config['name']; + $this->astNode = $config['astNode'] ?? null; + $this->description = $config['description'] ?? null; + $this->extensionASTNodes = $config['extensionASTNodes'] ?? null; } /**