src/Schema/Factories/NodeFactory.php
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);
            });
    }
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);
            });
    }
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 ) ; } ) ; }
Transform node to type.

@param  \GraphQL\Language\AST\TypeDefinitionNode  $definition
@return \GraphQL\Type\Definition\Type
Transform node to type .