public function handle(TypeDefinitionNode $definition): Type
    {
        $nodeValue = new NodeValue($definition);

        return $this->pipeline
            ->send($nodeValue)
            ->through(
                $this->directiveFactory->createNodeMiddleware($definition)
            )
            ->via('handleNode')
            ->then(function (NodeValue $value) use ($definition): Type {
                $nodeResolver = $this->directiveFactory->createNodeResolver($definition);

                if ($nodeResolver) {
                    return $nodeResolver->resolveNode($value);
                }

                return $this->resolveType($definition);
            });
    }